From 7137f1456512055d20c3ba82c291e4ac2376b7bb Mon Sep 17 00:00:00 2001 From: Ashley Dumaine Date: Thu, 29 Aug 2024 11:40:26 -0400 Subject: [PATCH] don't assume the IP holder immediately reflects the new IP to share --- cloud/linode/cilium_loadbalancers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cloud/linode/cilium_loadbalancers.go b/cloud/linode/cilium_loadbalancers.go index dbbd3c8b..4e74adca 100644 --- a/cloud/linode/cilium_loadbalancers.go +++ b/cloud/linode/cilium_loadbalancers.go @@ -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 @@ -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)