Skip to content

Commit

Permalink
don't assume the IP holder immediately reflects the new IP to share
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyDumaine committed Aug 29, 2024
1 parent a13fc1c commit 7137f14
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cloud/linode/cilium_loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ func (l *loadbalancers) createSharedIP(ctx context.Context, nodes []*v1.Node) (s
if err != nil {
return "", err
}
inClusterAddrs = append(inClusterAddrs, newSharedIP.Address)
// if any of the addrs don't exist on the ip-holder (e.g. someone manually deleted it outside the CCM),
// we need to exclude that from the list
// TODO: also clean up the CiliumLoadBalancerIPPool for that missing IP if that happens
Expand All @@ -230,7 +229,7 @@ func (l *loadbalancers) createSharedIP(ctx context.Context, nodes []*v1.Node) (s
klog.Infof("error getting shared IPs in cluster: %s", err.Error())
return "", err
}
addrs := []string{}
addrs := []string{newSharedIP.Address}
for _, i := range inClusterAddrs {
if slices.Contains(ipHolderAddrs, i) {
addrs = append(addrs, i)
Expand Down

0 comments on commit 7137f14

Please sign in to comment.