kubernetes / ingress-gce

Ingress controller for Google Cloud
Apache License 2.0
1.27k stars 301 forks source link

Adding InstanceGroupController does not remove nodes from instance group after adding `node.kubernetes.io/exclude-from-external-load-balancers` label #2724

Open VitusAcabado opened 2 weeks ago

VitusAcabado commented 2 weeks ago

I am running ingress-gce on a self-managed kubernetes cluster on GCE.

Adding the label node.kubernetes.io/exclude-from-external-load-balancers=true to a node that is already in an instance group does not get removed because of this line. This is observed if the instance group only has 1 node.

Since the list of nodes passed in the sync function already has the excluded nodes via CandidateNodeFilter here.

It never get processed in the for loop and these lines wont get executed.

This is observed for tags v1.30.3 onwards.

swetharepakula commented 1 week ago

cc/ @mmamczur