mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Refactor qos package
Signed-off-by: Buddha Prakash <buddhap@google.com>
This commit is contained in:
@@ -18,7 +18,6 @@ package qos
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/kubelet/qos/util"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -36,11 +35,11 @@ const (
|
||||
// and 1000. Containers with higher OOM scores are killed if the system runs out of memory.
|
||||
// See https://lwn.net/Articles/391222/ for more information.
|
||||
func GetContainerOOMScoreAdjust(pod *api.Pod, container *api.Container, memoryCapacity int64) int {
|
||||
switch util.GetPodQos(pod) {
|
||||
case util.Guaranteed:
|
||||
switch GetPodQos(pod) {
|
||||
case Guaranteed:
|
||||
// Guaranteed containers should be the last to get killed.
|
||||
return guaranteedOOMScoreAdj
|
||||
case util.BestEffort:
|
||||
case BestEffort:
|
||||
return besteffortOOMScoreAdj
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user