Skip to content

Commit 726d253

Browse files
committed
Reduce cyclomatic complexity of ReconcileLoadBalancer
This function had become genuinely too complex over time, to the point that even the linter was starting to complain about it when making almost any change. This change refactors ReconcileLoadBalancer into several smaller logical functions which are much easier to read and reason about. It also revealed some trivial optimisations: * Only fetch Octavia providers if we need them to create a new loadbalancer * Only calculate allowed CIDRs once * Don't re-fetch a loadbalancer to check it's active if it's already active
1 parent 5cfeccc commit 726d253

File tree

2 files changed

+209
-149
lines changed

2 files changed

+209
-149
lines changed

0 commit comments

Comments
 (0)