Skip to content

Commit fb6e0ee

Browse files
mdboothEmilienM
andcommitted
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 Co-Authored-By: Emilien Macchi <[email protected]>
1 parent dd85470 commit fb6e0ee

File tree

2 files changed

+567
-149
lines changed

2 files changed

+567
-149
lines changed

0 commit comments

Comments
 (0)