-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix(kubernetes): taint nodes on cluster upgrade #10705
fix(kubernetes): taint nodes on cluster upgrade #10705
Conversation
Hi @maxime1907. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
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.
I don't think we need to add so much set_fact
here, couldn't you use vars instead ?
Regarding using kubectl taint
vs --register
... Hum, is there no way to re-register on upgrade instead ?
Each new tasks means more playbooks run time.
Oh right we can just do this:
I tried this on a vanilla kubernetes 1.27.7 and it works! But i dont think its a good idea to delete the node because in case of failure it will be bad... |
f222dcb
to
5a483e5
Compare
I'm not sold on deleting the node either, I was more thinking along the lines of "Maybe there is a way to re-register without deleting". It might be wishful thinking on my end though ^ |
5a483e5
to
c908d21
Compare
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
c908d21
to
d293326
Compare
Yeah i don't think that it's possible to re-register a node without deleting it: So i guess we can go with this solution as for now |
@VannTen Any updates on this? |
I'm on vacation, I'll take a look when I get back (end of next week).
|
What bugs me is that I don't think this will erase old taints if you happen to remove them from your inventory... not very declarative. |
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.
What bugs me is that I don't think this will erase old taints if you happen to remove them from your inventory... not very declarative. OTOH it's better than the current situation where nodes just keep their labels forever. /lgtm /assign @floryut wdyt ? Forcing to delete the node to re-register it with new tains is probably a bit extreme... 🤔
Agree with you, this PR is better than the actual process, so let's go with it as is even if the limitation you are mentioning is indeed not perfect
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floryut, maxime1907 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
What type of PR is this?
/kind bug
What this PR does / why we need it:
Currently we are setting node taints through
kubelet
with the option--register-with-taints
.This works fine when first deploying a cluster but when we need to upgrade, it just does not work because they are only added at node registration.
This PR attempts to fix this issue by simply using kubectl to taint nodes like its done with labels:
Does this PR introduce a user-facing change?: