mirror of https://github.com/k3s-io/k3s
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-infrapull/6/head
commit
49a0475fcb
|
@ -172,16 +172,7 @@ func PodMatchesScopeFunc(scope api.ResourceQuotaScope, object runtime.Object) bo
|
|||
}
|
||||
|
||||
func isBestEffort(pod *api.Pod) bool {
|
||||
// TODO: when we have request/limits on a pod scope, we need to revisit this
|
||||
for _, container := range pod.Spec.Containers {
|
||||
qosPerResource := util.GetQoS(&container)
|
||||
for _, qos := range qosPerResource {
|
||||
if util.BestEffort == qos {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return util.GetPodQos(pod) == util.BestEffort
|
||||
}
|
||||
|
||||
func isTerminating(pod *api.Pod) bool {
|
||||
|
|
Loading…
Reference in New Issue