Commit b299b3d
committed
fix: return early in service reconciler when lb is nil
When buildModel returns lb == nil (e.g. for a ClusterIP service that
should not have a load balancer, such as one created by Istio Gateway
API with networking.istio.io/service-type: ClusterIP), the reconciler
correctly runs cleanupLoadBalancerResources but then falls through to
reconcileLoadBalancerResources with lb still nil. This causes a nil
pointer dereference panic at lb.DNSName().Resolve(ctx).
Add a return nil after successful cleanup when lb == nil so the
reconciler exits cleanly without entering the LB provisioning path.
Related: #4724
Signed-off-by: Joey Jonko <joey.jonko@happyreturns.com>1 parent 46816a2 commit b299b3d
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
0 commit comments