From 221db2bd6bb859c1fbf37e0e20d8568aaa779432 Mon Sep 17 00:00:00 2001 From: Harry Zhang Date: Thu, 24 Aug 2017 19:59:00 +0800 Subject: [PATCH] Refactor node taint conditions --- pkg/api/validation/validation_test.go | 4 ++-- plugin/pkg/scheduler/algorithm/well_known_labels.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 70168696b8f..d269d679771 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -5004,7 +5004,7 @@ func TestValidatePod(t *testing.T) { Name: "pod-forgiveness-invalid", Namespace: "ns", }, - Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "node.alpha.kubernetes.io/notReady", Operator: "Exists", Effect: "NoExecute", TolerationSeconds: &[]int64{-2}[0]}}), + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "node.kubernetes.io/not-ready", Operator: "Exists", Effect: "NoExecute", TolerationSeconds: &[]int64{-2}[0]}}), }, { // docker default seccomp profile ObjectMeta: metav1.ObjectMeta{ @@ -5562,7 +5562,7 @@ func TestValidatePod(t *testing.T) { Name: "pod-forgiveness-invalid", Namespace: "ns", }, - Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "node.alpha.kubernetes.io/notReady", Operator: "Exists", Effect: "NoSchedule", TolerationSeconds: &[]int64{20}[0]}}), + Spec: extendPodSpecwithTolerations(validPodSpec(nil), []api.Toleration{{Key: "node.kubernetes.io/not-ready", Operator: "Exists", Effect: "NoSchedule", TolerationSeconds: &[]int64{20}[0]}}), }, }, "must be a valid pod seccomp profile": { diff --git a/plugin/pkg/scheduler/algorithm/well_known_labels.go b/plugin/pkg/scheduler/algorithm/well_known_labels.go index 209d7279743..47215d8ad64 100644 --- a/plugin/pkg/scheduler/algorithm/well_known_labels.go +++ b/plugin/pkg/scheduler/algorithm/well_known_labels.go @@ -20,7 +20,7 @@ const ( // When feature-gate for TaintBasedEvictions=true flag is enabled, // TaintNodeNotReady would be automatically added by node controller // when node is not ready, and removed when node becomes ready. - TaintNodeNotReady = "node.alpha.kubernetes.io/notReady" + TaintNodeNotReady = "node.kubernetes.io/not-ready" // When feature-gate for TaintBasedEvictions=true flag is enabled, // TaintNodeUnreachable would be automatically added by node controller