Skip to content

Commit

Permalink
Fix infra status egress cidrs (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
hebelsan authored Aug 7, 2024
1 parent 19c4a1e commit 339ecec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/controller/infrastructure/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ func patchProviderStatusAndState(
patch := client.MergeFrom(infra.DeepCopy())
if status != nil {
infra.Status.ProviderStatus = &runtime.RawExtension{Object: status}
for _, natIP := range status.Networks.NatIPs {
infra.Status.EgressCIDRs = append(infra.Status.EgressCIDRs, fmt.Sprintf("%s/32", natIP.IP))
infra.Status.EgressCIDRs = make([]string, len(status.Networks.NatIPs))
for i, natIP := range status.Networks.NatIPs {
infra.Status.EgressCIDRs[i] = fmt.Sprintf("%s/32", natIP.IP)
}
}
if state != nil {
Expand Down

0 comments on commit 339ecec

Please sign in to comment.