mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user