-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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 control-plane node role label to cp nodes #10397
Conversation
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 think 1.21 is far too aggressive for removal of the legacy labels.
pkg/nodelabels/builder.go
Outdated
RoleNodeLabelValue15 = "node" | ||
RoleLabelName15 = "kubernetes.io/role" | ||
RoleLabelName16 = "kubernetes.io/role" | ||
RoleControlPlaneLabelValue15 = "master" |
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.
This change strikes me as being misleading.
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.
You want to keep the master name in this case?
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.
Because the value will have to continue to be "master", yes.
pkg/nodelabels/builder.go
Outdated
|
||
RoleLabelMaster16 = "node-role.kubernetes.io/master" | ||
RoleLabelNode16 = "node-role.kubernetes.io/node" | ||
RoleLabelControlPlane16 = "node-role.kubernetes.io/master" |
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.
Also misleading.
pkg/nodelabels/builder_test.go
Outdated
RoleLabelControlPlane20: "", | ||
RoleLabelName15: RoleControlPlaneLabelValue15, | ||
"master1": "master1", | ||
"master2": "master2", |
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.
Might as well change these two.
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.
Makes sense
1ddf085
to
8525e3f
Compare
8525e3f
to
d5faa58
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: olemarkus 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 |
@olemarkus: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Update docs/releases/1.20-NOTES.md Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
d5faa58
to
2b3a8f1
Compare
/lgtm |
@@ -20,6 +22,8 @@ | |||
|
|||
* If you are running `kops toolbox template` in an airgapped environment, you have to set `--channel` to point to a local channel file. | |||
|
|||
* If your workload targets control plane nodes, you need to change them to select the `node-role.kubernetes.io/control-plane=""` label. You should also add the `node-role.kubernetes.io/control-plane:NoSchedule` toleration to these workloads. This taint will not be added to control plane nodes before kOps 1.22. |
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.
Hi 👋
I arrived here from 1.23 release notes: https://github.com/kubernetes/kops/blob/v1.23.0/docs/releases/1.23-NOTES.md?plain=1#L48
I'm running kOps v1.22.2 and can confirm there is no matching taint as suggested in this PR. So when I replace my node-role.kubernetes.io/master:NoSchedule
toleration as suggested here, my pod won't schedule.
Is it possible someone forgot to add the new taint? Or, if was it added in between v1.22 and v1.23, can someone point me to the source code?
Many thanks!
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.
The notes say you need both taints to be forward proof
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.
Thanks for the quick reply! For future readers ref #13452
Following kubeadm and others, we should change the control plane label and taints.
Personally I want to minimise the time we use both labels, so the timeline is agressive. But consider the timeline more a suggestion open for discussion.