Merge pull request #98703 from Huang-Wei/untolerated-regress

Fix a bug that untolerated variable is used as tolerated
This commit is contained in:
Kubernetes Prow Robot 2021-02-02 18:50:29 -08:00 committed by GitHub
commit 7655badece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -266,8 +266,8 @@ func isNodeUntainted(node *v1.Node) bool {
n = nodeCopy
}
_, tolerated := v1helper.FindMatchingUntoleratedTaint(n.Spec.Taints, fakePod.Spec.Tolerations, func(t *v1.Taint) bool {
_, untolerated := v1helper.FindMatchingUntoleratedTaint(n.Spec.Taints, fakePod.Spec.Tolerations, func(t *v1.Taint) bool {
return t.Effect == v1.TaintEffectNoExecute || t.Effect == v1.TaintEffectNoSchedule
})
return tolerated
return !untolerated
}