mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
preemption: typo cleanup
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This commit is contained in:
parent
b95d571e32
commit
cdd92d39b7
@ -132,21 +132,21 @@ func getPodsToPreempt(pod *v1.Pod, pods []*v1.Pod, requirements admissionRequire
|
|||||||
return nil, fmt.Errorf("no set of running pods found to reclaim resources: %v", unableToMeetRequirements.toString())
|
return nil, fmt.Errorf("no set of running pods found to reclaim resources: %v", unableToMeetRequirements.toString())
|
||||||
}
|
}
|
||||||
// find the guaranteed pods we would need to evict if we already evicted ALL burstable and besteffort pods.
|
// find the guaranteed pods we would need to evict if we already evicted ALL burstable and besteffort pods.
|
||||||
guarateedToEvict, err := getPodsToPreemptByDistance(guaranteedPods, requirements.subtract(append(bestEffortPods, burstablePods...)...))
|
guaranteedToEvict, err := getPodsToPreemptByDistance(guaranteedPods, requirements.subtract(append(bestEffortPods, burstablePods...)...))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Find the burstable pods we would need to evict if we already evicted ALL besteffort pods, and the required guaranteed pods.
|
// Find the burstable pods we would need to evict if we already evicted ALL besteffort pods, and the required guaranteed pods.
|
||||||
burstableToEvict, err := getPodsToPreemptByDistance(burstablePods, requirements.subtract(append(bestEffortPods, guarateedToEvict...)...))
|
burstableToEvict, err := getPodsToPreemptByDistance(burstablePods, requirements.subtract(append(bestEffortPods, guaranteedToEvict...)...))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
// Find the besteffort pods we would need to evict if we already evicted the required guaranteed and burstable pods.
|
// Find the besteffort pods we would need to evict if we already evicted the required guaranteed and burstable pods.
|
||||||
bestEffortToEvict, err := getPodsToPreemptByDistance(bestEffortPods, requirements.subtract(append(burstableToEvict, guarateedToEvict...)...))
|
bestEffortToEvict, err := getPodsToPreemptByDistance(bestEffortPods, requirements.subtract(append(burstableToEvict, guaranteedToEvict...)...))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return append(append(bestEffortToEvict, burstableToEvict...), guarateedToEvict...), nil
|
return append(append(bestEffortToEvict, burstableToEvict...), guaranteedToEvict...), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// getPodsToPreemptByDistance finds the pods that have pod requests >= admission requirements.
|
// getPodsToPreemptByDistance finds the pods that have pod requests >= admission requirements.
|
||||||
|
Loading…
Reference in New Issue
Block a user