Skip to content

Commit 046d2e3

Browse files
authored
Merge pull request #1340 from giantswarm/fix_network_status_nilpointer_reconciliation
🐛 fix nilpointer during clusterctl move
2 parents 68a9ee6 + 578040d commit 046d2e3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/cloud/services/loadbalancer/loadbalancer.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,13 @@ func (s *Service) ReconcileLoadBalancer(openStackCluster *infrav1.OpenStackClust
134134
}
135135

136136
if allowedCIDRsSupported {
137-
if err := s.getOrUpdateAllowedCIDRS(openStackCluster, listener); err != nil {
138-
return err
137+
// Skip reconciliation if network status is nil (e.g. during clusterctl move)
138+
if openStackCluster.Status.Network != nil {
139+
if err := s.getOrUpdateAllowedCIDRS(openStackCluster, listener); err != nil {
140+
return err
141+
}
142+
allowedCIDRs = listener.AllowedCIDRs
139143
}
140-
allowedCIDRs = listener.AllowedCIDRs
141144
}
142145
}
143146

0 commit comments

Comments
 (0)