The Pod is eligible to preempt when previous nominanted node is UnschedulableAndUnresolvable

If the Pod's previous nominated node is UnschedulableAndUnresolvable from previous
filtering, it should be considered for preemption again.
This commit is contained in:
He Jie Xu
2020-06-29 16:43:59 +08:00
parent 6cedc0853f
commit b3741f344e
3 changed files with 69 additions and 2 deletions

View File

@@ -244,6 +244,12 @@ func (p *PodWrapper) StartTime(t metav1.Time) *PodWrapper {
return p
}
// NominatedNodeName sets `n` as the .Status.NominatedNodeName of the inner pod.
func (p *PodWrapper) NominatedNodeName(n string) *PodWrapper {
p.Status.NominatedNodeName = n
return p
}
// PodAffinityKind represents different kinds of PodAffinity.
type PodAffinityKind int