Skip to content

Commit

Permalink
Merge pull request #26969 from derekwaynecarr/use_qos_utility
Browse files Browse the repository at this point in the history
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
  • Loading branch information
k8s-merge-robot authored Jun 12, 2016
2 parents 59f918c + f796cc3 commit 49a0475
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pkg/quota/evaluator/core/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 49a0475

Please sign in to comment.