Skip to content

Commit

Permalink
fix(lb): apply node filtering on all updates
Browse files Browse the repository at this point in the history
Signed-off-by: Aurelien GASTON <[email protected]>
  • Loading branch information
nox-404 committed Dec 1, 2023
1 parent 0dbd179 commit 8385a53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scaleway/loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@ func (l *loadbalancers) EnsureLoadBalancer(ctx context.Context, clusterName stri
return nil, LoadBalancerNotReady
}

nodes = filterNodes(service, nodes)

err = l.updateLoadBalancer(ctx, lb, service, nodes)
if err != nil {
klog.Errorf("error updating loadbalancer for service %s/%s: %v", service.Namespace, service.Name, err)
Expand Down Expand Up @@ -614,6 +612,7 @@ func (l *loadbalancers) unannotateAndPatch(service *v1.Service) error {
}

func (l *loadbalancers) updateLoadBalancer(ctx context.Context, loadbalancer *scwlb.LB, service *v1.Service, nodes []*v1.Node) error {
nodes = filterNodes(service, nodes)
if l.pnID != "" {
respPN, err := l.api.ListLBPrivateNetworks(&scwlb.ZonedAPIListLBPrivateNetworksRequest{
Zone: loadbalancer.Zone,
Expand Down

0 comments on commit 8385a53

Please sign in to comment.