mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Align quota BestEffort scope with recent changes
This commit is contained in:
parent
7476d97781
commit
f796cc335d
@ -172,16 +172,7 @@ func PodMatchesScopeFunc(scope api.ResourceQuotaScope, object runtime.Object) bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
func isBestEffort(pod *api.Pod) bool {
|
func isBestEffort(pod *api.Pod) bool {
|
||||||
// TODO: when we have request/limits on a pod scope, we need to revisit this
|
return util.GetPodQos(pod) == util.BestEffort
|
||||||
for _, container := range pod.Spec.Containers {
|
|
||||||
qosPerResource := util.GetQoS(&container)
|
|
||||||
for _, qos := range qosPerResource {
|
|
||||||
if util.BestEffort == qos {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func isTerminating(pod *api.Pod) bool {
|
func isTerminating(pod *api.Pod) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user