-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
✨ Taint nodes with PreferNoSchedule during rollouts #10223
Conversation
Note: this should address all review comments at the old PR at: |
/assign fabriziopandini :-) |
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
LGTM label has been added. Git tree hash: fe9e6163ba3a9389e9364729393af3815366a1b4
|
/lgtm |
LGTM label has been added. Git tree hash: 8d7ac3394a1fc0a645111e8e20d4d0912dea60ef
|
@chrischdi I think the PR description does not reflect the current implementation (the second paragraph) |
updated it. |
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.
Just a few nits otherwise lgtm
Thx! Feel free to squash /lgtm |
LGTM label has been added. Git tree hash: cb0bee687d69fa53d290690c2ea8c4a353db1166
|
If possible, please just squash instead of squash+rebase. Then the lgtm label stays there and nobody has to verify if there are rebase errors :) /lgtm |
LGTM label has been added. Git tree hash: e2adf1c8a8edfa78dbc079b1039ab606982771d4
|
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
Co-authored-by: Hiromu Asahina <[email protected]>
Co-authored-by: Hiromu Asahina <[email protected]>
What this PR does / why we need it:
This PR builds on top of the amazing work of @hiromu-a5a and finishes this feature. Thanks to @hiromu-a5a for starting the initially work at:
If the MachineSet or MachineDeployment has many replicas, and each node has many pods, changes to an existing MachineDeployment or MachineSet infrastructure template can result in unnecessary pod churn. As the first node is drained, pods previously running on that node may be scheduled onto nodes who have yet to be replaced, but will be torn down soon. This can happen over and over again.
To avoid the above problem, this PR changes the machine controller to add a
corev1.TaintEffectPreferNoSchedule
taint to nodes in old MachineSet. As mentioned in #7043 (comment), tainting should be triggered by Machine controller.In the Machine's
reconcileNode
phase, the machine get's checked if it should have the outdated taint by checking if it is part of an machinedeployment's machineset which is in a older revision than the machine deployment.If so, the taint gets ensured on the node object.
This behavior may be related to #493
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #7043
/area machinedeployment