-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add and remove exclude-from-external-load-balancers label #582
Conversation
/assign @bwagner5 |
Tested manually on an EKS cluster:
I have not tested the label removal when uncordoning a node. The label should not be removed if the value does not match |
Would there be any harm in always labeling with the We have so much configuration already, just curious if it makes sense to put it behind a flag or if we should always add the label as part of a graceful termination. I'm not strongly opposed to a flag, so if there is a good reason why someone would not want to have a node labeled with this, then this LGTM! |
There is a discussion about this in an issue in aws-load-balancer-controller.
I think the behavior change could be surprising for some when all instances are terminated from the ASG (ex. something that might happen when using spot instances). I guess leaving the instances attached to the LB for as long as possible in that scenario might be preferable. This is why I would leave it as a feature flag, and in principal I have no issue with it being on by default except that it might break someone's expectations in this specific scenario. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
These failing tests seem to be permission errors, hopefully nothing I'm responsible for causing! |
@tjs-intel Looks like it was a transient failure; they passed when I re-ran them. |
Issue #, if available: #316
Description of changes:
Apply the label
node.kubernetes.io/exclude-from-external-load-balancers=aws-node-termination-handler
to tell load balancer controllers (likeaws-load-balancer-controller
) to exclude the node from load balancers before it is brought offline. If the label is already applied, don't do anything. When uncordoning the node, check that the label's value isaws-node-termination-handler
before removing it.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.