Merge pull request #84036 from Huang-Wei/tbe-int-test-issue

Ensure TaintBasedEviction int test not rely on TaintNodeByConditions
This commit is contained in:
Kubernetes Prow Robot 2019-10-17 05:12:50 -07:00 committed by GitHub
commit 534051acec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -689,7 +689,7 @@ func TestTaintBasedEvictions(t *testing.T) {
0.55, // Unhealthy zone threshold 0.55, // Unhealthy zone threshold
true, // Run taint manager true, // Run taint manager
true, // Use taint based evictions true, // Use taint based evictions
false, // Enabled TaintNodeByCondition feature true, // Enabled TaintNodeByCondition feature
) )
if err != nil { if err != nil {
t.Errorf("Failed to create node controller: %v", err) t.Errorf("Failed to create node controller: %v", err)

View File

@ -385,7 +385,8 @@ func nodeTainted(cs clientset.Interface, nodeName string, taints []v1.Taint) wai
return false, err return false, err
} }
if len(taints) != len(node.Spec.Taints) { // node.Spec.Taints may have more taints
if len(taints) > len(node.Spec.Taints) {
return false, nil return false, nil
} }