Commit 49a0475f authored by k8s-merge-robot's avatar k8s-merge-robot Committed by GitHub

Merge pull request #26969 from derekwaynecarr/use_qos_utility

Automatic merge from submit-queue ResourceQuota BestEffort scope aligned with Pod level QoS This aligns quota with the changes in kubelet and CLI. So if quota allows 10 `BestEffort` pods, it will now track properly with what the user sees with changes in 1.3. ``` apiVersion: v1 kind: ResourceQuota metadata: name: best-effort spec: hard: pods: "10" scopes: - BestEffort ``` /cc @vishh @kubernetes/rh-cluster-infra
parents 59f918ca f796cc33
...@@ -172,16 +172,7 @@ func PodMatchesScopeFunc(scope api.ResourceQuotaScope, object runtime.Object) bo ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment