Update godeps
This commit is contained in:
parent
a965f44f84
commit
73e22a50d2
453 changed files with 84778 additions and 70308 deletions
9
vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy.go
generated
vendored
9
vendor/k8s.io/kubernetes/pkg/kubelet/qos/policy.go
generated
vendored
|
|
@ -21,8 +21,9 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
PodInfraOOMAdj int = -999
|
||||
PodInfraOOMAdj int = -998
|
||||
KubeletOOMScoreAdj int = -999
|
||||
DockerOOMScoreAdj int = -999
|
||||
KubeProxyOOMScoreAdj int = -999
|
||||
guaranteedOOMScoreAdj int = -998
|
||||
besteffortOOMScoreAdj int = 1000
|
||||
|
|
@ -53,10 +54,10 @@ func GetContainerOOMScoreAdjust(pod *api.Pod, container *api.Container, memoryCa
|
|||
// Note that this is a heuristic, it won't work if a container has many small processes.
|
||||
memoryRequest := container.Resources.Requests.Memory().Value()
|
||||
oomScoreAdjust := 1000 - (1000*memoryRequest)/memoryCapacity
|
||||
// A guaranteed pod using 100% of memory can have an OOM score of 1. Ensure
|
||||
// A guaranteed pod using 100% of memory can have an OOM score of 10. Ensure
|
||||
// that burstable pods have a higher OOM score adjustment.
|
||||
if oomScoreAdjust < 2 {
|
||||
return 2
|
||||
if int(oomScoreAdjust) < (1000 + guaranteedOOMScoreAdj) {
|
||||
return (1000 + guaranteedOOMScoreAdj)
|
||||
}
|
||||
// Give burstable pods a higher chance of survival over besteffort pods.
|
||||
if int(oomScoreAdjust) == besteffortOOMScoreAdj {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue