Merge pull request #38989 from sjenning/set-qos-field

Automatic merge from submit-queue (batch tested with PRs 39684, 39577, 38989, 39534, 39702)

Set PodStatus QOSClass field

This PR continues the work for https://github.com/kubernetes/kubernetes/pull/37968

It converts all local usage of the `qos` package class types to the new API level types (first commit) and sets the pod status QOSClass field in the at pod creation time on the API server in `PrepareForCreate` and in the kubelet in the pod status update path (second commit).  This way the pod QOS class is set even if the pod isn't scheduled yet.

Fixes #33255

@ConnorDoyle @derekwaynecarr @vishh
This commit is contained in:
Kubernetes Submit Queue
2017-01-10 22:24:13 -08:00
committed by GitHub
21 changed files with 315 additions and 217 deletions

View File

@@ -49,10 +49,10 @@ func GetContainerOOMScoreAdjust(pod *v1.Pod, container *v1.Container, memoryCapa
}
switch GetPodQOS(pod) {
case Guaranteed:
case v1.PodQOSGuaranteed:
// Guaranteed containers should be the last to get killed.
return guaranteedOOMScoreAdj
case BestEffort:
case v1.PodQOSBestEffort:
return besteffortOOMScoreAdj
}