@@ -30,7 +30,6 @@ import (
30
30
"k8s.io/apimachinery/pkg/util/rand"
31
31
"k8s.io/apimachinery/pkg/util/sets"
32
32
clientset "k8s.io/client-go/kubernetes"
33
- nodectlr "k8s.io/kubernetes/pkg/controller/nodelifecycle"
34
33
schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo"
35
34
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
36
35
"k8s.io/kubernetes/test/e2e/system"
@@ -48,6 +47,22 @@ const (
48
47
sshPort = "22"
49
48
)
50
49
50
+ var (
51
+ // unreachableTaintTemplate is the taint for when a node becomes unreachable.
52
+ // Copied from pkg/controller/nodelifecycle to avoid pulling extra dependencies
53
+ unreachableTaintTemplate = & v1.Taint {
54
+ Key : v1 .TaintNodeUnreachable ,
55
+ Effect : v1 .TaintEffectNoExecute ,
56
+ }
57
+
58
+ // notReadyTaintTemplate is the taint for when a node is not ready for executing pods.
59
+ // Copied from pkg/controller/nodelifecycle to avoid pulling extra dependencies
60
+ notReadyTaintTemplate = & v1.Taint {
61
+ Key : v1 .TaintNodeNotReady ,
62
+ Effect : v1 .TaintEffectNoExecute ,
63
+ }
64
+ )
65
+
51
66
// PodNode is a pod-node pair indicating which node a given pod is running on
52
67
type PodNode struct {
53
68
// Pod represents pod name
@@ -79,7 +94,7 @@ func isNodeConditionSetAsExpected(node *v1.Node, conditionType v1.NodeConditionT
79
94
// For NodeReady we need to check if Taints are gone as well
80
95
taints := node .Spec .Taints
81
96
for _ , taint := range taints {
82
- if taint .MatchTaint (nodectlr . UnreachableTaintTemplate ) || taint .MatchTaint (nodectlr . NotReadyTaintTemplate ) {
97
+ if taint .MatchTaint (unreachableTaintTemplate ) || taint .MatchTaint (notReadyTaintTemplate ) {
83
98
hasNodeControllerTaints = true
84
99
break
85
100
}
0 commit comments