stackitcloud / yawol

yawol is a Load Balancer solution for OpenStack, based on the Kubernetes controller pattern.
Apache License 2.0
41 stars 5 forks source link

Improve Watch/Reconcile triggers of `LoadbalancerSet` controller #283

Closed maboehm closed 5 months ago

maboehm commented 6 months ago

Avoid triggering ourselves due to status updates. This should help with yawol creating more LBMs than necessary, as we'd only reconcile 2s after a change to the number of LBMs at which point the cache is very likely up-to-date.

Testing this manually was quite successful, showing e.g. new LBMs are created in about 2s intervals:

$ k get lbm --output custom-columns=name:.metadata.name,age:.status.creationTimestamp
name                                    age
default--nginx-onfufk3nyhpp2vm6-4792a   2024-01-22T17:28:18Z
# scale up to 3
default--nginx-onfufk3nyhpp2vm6-9428f   2024-01-24T14:31:06Z
default--nginx-onfufk3nyhpp2vm6-fe09b   2024-01-24T14:31:04Z
# triggered rolling update
default--nginx-qdbmexfvhnyvjjqq-3eaed   2024-01-24T14:32:58Z
default--nginx-qdbmexfvhnyvjjqq-822ba   2024-01-24T14:33:03Z
default--nginx-qdbmexfvhnyvjjqq-fe3b0   2024-01-24T14:32:57Z