mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-08 16:30:57 -04:00
Merge pull request #76410 from hex108/priority
Save pod priority to avoid repeated calculation
This commit is contained in:
commit
ad17bf05d9
1 changed files with 2 additions and 1 deletions
|
|
@ -1160,8 +1160,9 @@ func podEligibleToPreemptOthers(pod *v1.Pod, nodeNameToInfo map[string]*schedule
|
|||
nomNodeName := pod.Status.NominatedNodeName
|
||||
if len(nomNodeName) > 0 {
|
||||
if nodeInfo, found := nodeNameToInfo[nomNodeName]; found {
|
||||
podPriority := util.GetPodPriority(pod)
|
||||
for _, p := range nodeInfo.Pods() {
|
||||
if p.DeletionTimestamp != nil && util.GetPodPriority(p) < util.GetPodPriority(pod) {
|
||||
if p.DeletionTimestamp != nil && util.GetPodPriority(p) < podPriority {
|
||||
// There is a terminating pod on the nominated node.
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue