mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 10:48:15 +00:00
bugfix for PodToleratesNodeTaints
This commit is contained in:
@@ -1180,11 +1180,6 @@ func tolerationsToleratesTaints(tolerations []v1.Toleration, taints []v1.Taint)
|
||||
return true
|
||||
}
|
||||
|
||||
// The taint list isn't nil/empty, a nil/empty toleration list can't tolerate them.
|
||||
if len(tolerations) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
for i := range taints {
|
||||
taint := &taints[i]
|
||||
// skip taints that have effect PreferNoSchedule, since it is for priorities
|
||||
@@ -1192,7 +1187,7 @@ func tolerationsToleratesTaints(tolerations []v1.Toleration, taints []v1.Taint)
|
||||
continue
|
||||
}
|
||||
|
||||
if !v1.TaintToleratedByTolerations(taint, tolerations) {
|
||||
if len(tolerations) == 0 || !v1.TaintToleratedByTolerations(taint, tolerations) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user