stackitcloud / yawol

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

Improve Requeue durations of LoadBalancer Reconciler #284

Closed maboehm closed 7 months ago

maboehm commented 8 months ago

The LB controller is careful before scaling down an old LBS, requiring the new LBS to have the keepalived master for at least two minutes. But during that "stability" wait period, it is likely that nothing will trigger another reconcile (LB&LBS are stable at this point), so the next time the reconciler is run is after 5 minutes.

With this change, the check function helper.LBSetHasKeepalivedMaster() also returns a duration after which it's worth checking again. We use that to determine our next reconcile, making sure to limit this to 5 minutes.