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