Skip to content

Commit

Permalink
Merge pull request #229 from linode/shared-ip-check-fix
Browse files Browse the repository at this point in the history
[fix] don't assume the IP holder immediately reflects the new IP to share for a cilium-bgp-lb Service
  • Loading branch information
AshleyDumaine authored Aug 29, 2024
2 parents a13fc1c + 7137f14 commit 708ee98
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 708ee98

Please sign in to comment.