diff --git a/hack/log/log-dump-daemonset.yaml b/hack/log/log-dump-daemonset.yaml index 118c1bb06345..23f95156bcfa 100644 --- a/hack/log/log-dump-daemonset.yaml +++ b/hack/log/log-dump-daemonset.yaml @@ -29,6 +29,10 @@ spec: key: node-role.kubernetes.io/master operator: Equal value: "true" + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane + operator: Equal + value: "true" - effect: NoExecute operator: Exists - effect: NoSchedule diff --git a/templates/addons/metrics-server/metrics-server.yaml b/templates/addons/metrics-server/metrics-server.yaml index b1fa7b0b2500..5f99ad39b0eb 100644 --- a/templates/addons/metrics-server/metrics-server.yaml +++ b/templates/addons/metrics-server/metrics-server.yaml @@ -176,6 +176,9 @@ spec: - effect: NoSchedule key: node-role.kubernetes.io/master operator: Exists + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane + operator: Exists volumes: - emptyDir: {} name: tmp-dir diff --git a/templates/addons/metrics-server/patches/control-plane-toleration.yaml b/templates/addons/metrics-server/patches/control-plane-toleration.yaml index ea9d59c58dec..408f366eb8f2 100644 --- a/templates/addons/metrics-server/patches/control-plane-toleration.yaml +++ b/templates/addons/metrics-server/patches/control-plane-toleration.yaml @@ -12,3 +12,6 @@ spec: - key: "node-role.kubernetes.io/master" operator: "Exists" effect: "NoSchedule" + - key: "node-role.kubernetes.io/control-plane" + operator: "Exists" + effect: "NoSchedule" diff --git a/templates/test/ci/cluster-template-prow-ci-version-windows-containerd-2022.yaml b/templates/test/ci/cluster-template-prow-ci-version-windows-containerd-2022.yaml index 2e152a4ee26b..b4fa1dd8506f 100644 --- a/templates/test/ci/cluster-template-prow-ci-version-windows-containerd-2022.yaml +++ b/templates/test/ci/cluster-template-prow-ci-version-windows-containerd-2022.yaml @@ -4916,6 +4916,9 @@ data: - effect: NoSchedule key: node-role.kubernetes.io/master operator: Exists + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane + operator: Exists volumes: - emptyDir: {} name: tmp-dir diff --git a/templates/test/ci/cluster-template-prow-ci-version.yaml b/templates/test/ci/cluster-template-prow-ci-version.yaml index cf5a627f3dee..0011f4d3b6ee 100644 --- a/templates/test/ci/cluster-template-prow-ci-version.yaml +++ b/templates/test/ci/cluster-template-prow-ci-version.yaml @@ -4916,6 +4916,9 @@ data: - effect: NoSchedule key: node-role.kubernetes.io/master operator: Exists + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane + operator: Exists volumes: - emptyDir: {} name: tmp-dir diff --git a/test/e2e/conformance_test.go b/test/e2e/conformance_test.go index 5106d83443f3..f17b48e3554f 100644 --- a/test/e2e/conformance_test.go +++ b/test/e2e/conformance_test.go @@ -1,3 +1,4 @@ +//go:build e2e // +build e2e /* @@ -183,13 +184,23 @@ var _ = Describe("Conformance Tests", func() { LabelSelector: "kubernetes.io/os=linux", } - noScheduleTaint := &corev1.Taint{ + // This is kept to support versions of k8s < 1.20. + deprecatedNoScheduleTaint := &corev1.Taint{ Key: "node-role.kubernetes.io/master", Value: "", Effect: "NoSchedule", } - err := node.TaintNode(workloadProxy.GetClientSet(), options, noScheduleTaint) + noScheduleTaint := &corev1.Taint{ + Key: "node-role.kubernetes.io/control-plane", + Value: "", + Effect: "NoSchedule", + } + + err := node.TaintNode(workloadProxy.GetClientSet(), options, deprecatedNoScheduleTaint) + Expect(err).NotTo(HaveOccurred()) + + err = node.TaintNode(workloadProxy.GetClientSet(), options, noScheduleTaint) Expect(err).NotTo(HaveOccurred()) // Windows requires a repo-list because some images are not in k8s gcr