Skip to content
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

Replace node-role.kubernetes.io/master with control-plane label and add control-plane toleration #2017

Merged
merged 2 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion addons/backups-restic/backups-restic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
operator: Exists
- key: node-role.kubernetes.io/master
effect: NoSchedule
operator: Exists
Expand Down
2 changes: 2 additions & 0 deletions addons/calico-vxlan/calico-vxlan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4382,6 +4382,8 @@ spec:
# Mark the pod as a critical add-on for rescheduling.
- key: CriticalAddonsOnly
operator: Exists
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
serviceAccountName: calico-kube-controllers
Expand Down
4 changes: 3 additions & 1 deletion addons/ccm-aws/ccm-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@ spec:
cpu: 200m
hostNetwork: true
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
serviceAccountName: cloud-controller-manager
tolerations:
- effect: NoSchedule
key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
- effect: NoSchedule
key: node-role.kubernetes.io/master
updateStrategy:
Expand Down
7 changes: 6 additions & 1 deletion addons/ccm-azure/ccm-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,15 @@ spec:
hostNetwork: true
serviceAccountName: cloud-controller-manager
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
- key: "node.cloudprovider.kubernetes.io/uninitialized"
value: "true"
effect: "NoSchedule"
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
containers:
- name: cloud-controller-manager
image: "{{ .InternalImages.Get "AzureCCM" }}"
Expand Down Expand Up @@ -285,6 +287,9 @@ spec:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
Expand Down
2 changes: 1 addition & 1 deletion addons/ccm-openstack/ccm-openstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ spec:
spec:
priorityClassName: system-cluster-critical
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
securityContext:
runAsUser: 1001
tolerations:
Expand Down
5 changes: 4 additions & 1 deletion addons/ccm-vsphere/ccm-vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,16 @@ spec:
spec:
priorityClassName: system-cluster-critical
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
securityContext:
runAsUser: 1001
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
operator: Exists
- key: node-role.kubernetes.io/master
effect: NoSchedule
operator: Exists
Expand Down
4 changes: 4 additions & 0 deletions addons/cluster-autoscaler/cluster-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,16 @@ spec:
serviceAccountName: cluster-autoscaler
terminationGracePeriodSeconds: 10
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
- effect: NoSchedule
key: node-role.kubernetes.io/master
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: Exists
- key: node-role.kubernetes.io/master
operator: Exists
2 changes: 2 additions & 0 deletions addons/cni-canal/canal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4378,6 +4378,8 @@ spec:
# Mark the pod as a critical add-on for rescheduling.
- key: CriticalAddonsOnly
operator: Exists
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
serviceAccountName: calico-kube-controllers
Expand Down
4 changes: 2 additions & 2 deletions addons/csi-aws-ebs/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
spec:
nodeSelector:
kubernetes.io/os: linux
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
serviceAccountName: ebs-csi-controller-sa
priorityClassName: system-cluster-critical
tolerations:
Expand All @@ -31,7 +31,7 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
- operator: Exists
Expand Down
2 changes: 1 addition & 1 deletion addons/csi-aws-ebs/csi-snapshot-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
containers:
Expand Down
2 changes: 1 addition & 1 deletion addons/csi-azuredisk/csi-azuredisk-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
containers:
Expand Down
2 changes: 1 addition & 1 deletion addons/csi-azuredisk/csi-snapshot-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
containers:
Expand Down
2 changes: 1 addition & 1 deletion addons/csi-azurefile/csi-azurefile-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
containers:
Expand Down
2 changes: 1 addition & 1 deletion addons/csi-azurefile/csi-snapshot-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
containers:
Expand Down
4 changes: 2 additions & 2 deletions addons/csi-nutanix/ntnx-csi-provisioner-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ spec:
- --csi-address=/csi/csi.sock
- --http-endpoint=:9807
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
priorityClassName: system-cluster-critical
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
volumes:
Expand Down
4 changes: 2 additions & 2 deletions addons/csi-nutanix/snapshot-controller-sts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ spec:
runAsNonRoot: true
runAsUser: 1000
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
priorityClassName: system-cluster-critical
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
4 changes: 2 additions & 2 deletions addons/csi-nutanix/validating-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ spec:
secret:
secretName: nutanix-webhook-certs
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
priorityClassName: system-cluster-critical
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/controlplane"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
---
Expand Down
5 changes: 4 additions & 1 deletion addons/csi-vsphere/validatingwebhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ spec:
spec:
serviceAccountName: vsphere-csi-webhook
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
Expand Down
5 changes: 4 additions & 1 deletion addons/csi-vsphere/vsphere-csi-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ spec:
spec:
serviceAccountName: vsphere-csi-controller
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
Expand Down
5 changes: 4 additions & 1 deletion addons/machinecontroller/deployment-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ spec:
app: machine-controller
spec:
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: "node-role.kubernetes.io/control-plane"
operator: Exists
effect: NoSchedule
- key: "node-role.kubernetes.io/master"
operator: Exists
effect: NoSchedule
Expand Down
5 changes: 4 additions & 1 deletion addons/machinecontroller/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ spec:
app: machine-controller-webhook
spec:
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: "node-role.kubernetes.io/control-plane"
operator: Exists
effect: NoSchedule
- key: "node-role.kubernetes.io/master"
operator: Exists
effect: NoSchedule
Expand Down
2 changes: 1 addition & 1 deletion addons/operating-system-manager/deployment-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
app: operating-system-manager
spec:
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: "node-role.kubernetes.io/master"
operator: Exists
Expand Down
2 changes: 1 addition & 1 deletion addons/operating-system-manager/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
app: operating-system-manager-webhook
spec:
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: "node-role.kubernetes.io/master"
operator: Exists
Expand Down
2 changes: 2 additions & 0 deletions addons/unattended-upgrades/apt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ spec:
- ubuntu
- debian
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
hostPID: true
Expand Down
8 changes: 8 additions & 0 deletions addons/unattended-upgrades/fluo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ spec:
securityContext:
runAsUser: 0
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
Expand Down Expand Up @@ -348,6 +351,9 @@ spec:
fieldRef:
fieldPath: metadata.namespace
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
Expand Down Expand Up @@ -390,6 +396,8 @@ spec:
values:
- flatcar
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
hostPID: true
Expand Down
2 changes: 2 additions & 0 deletions addons/unattended-upgrades/kured.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ spec:
- ubuntu
serviceAccountName: kured
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
hostPID: true # Facilitate entering the host mount namespace via init
Expand Down
2 changes: 2 additions & 0 deletions addons/unattended-upgrades/yum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ spec:
- centos
- rhel
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
hostPID: true
Expand Down
2 changes: 1 addition & 1 deletion pkg/clusterstatus/preflightstatus/preflightstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
)

const (
LabelControlPlaneNode = "node-role.kubernetes.io/master"
LabelControlPlaneNode = "node-role.kubernetes.io/control-plane"
LabelUpgradeLock = "kubeone.io/upgrade-in-progress"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/tasks/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (

const (
labelUpgradeLock = "kubeone.io/upgrade-in-progress"
labelControlPlaneNode = "node-role.kubernetes.io/master"
labelControlPlaneNode = "node-role.kubernetes.io/control-plane"
// timeoutNodeUpgrade is time for how long kubeone will wait after finishing the upgrade
// process on the node
timeoutNodeUpgrade = 30 * time.Second
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
)

const (
labelControlPlaneNode = "node-role.kubernetes.io/master"
labelControlPlaneNode = "node-role.kubernetes.io/control-plane"
delayUpgrade = 2 * time.Minute
)

Expand Down