Skip to content

Commit 492ef41

Browse files
committed
fix(lb): apply node filtering on all updates
1 parent 0dbd179 commit 492ef41

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scaleway/loadbalancers.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,6 @@ func (l *loadbalancers) EnsureLoadBalancer(ctx context.Context, clusterName stri
333333
return nil, LoadBalancerNotReady
334334
}
335335

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

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

0 commit comments

Comments
 (0)