Merge pull request #39455 from kubernetes/revert-39306-oom_score_adj

Automatic merge from submit-queue (batch tested with PRs 39486, 37288, 39477, 39455, 39542)

Revert "Small improve for GetContainerOOMScoreAdjust"

Reverts kubernetes/kubernetes#39306

This does not help current code healthy, let's revert it to avoid further confusing.
This commit is contained in:
Kubernetes Submit Queue 2017-01-10 14:33:17 -08:00 committed by GitHub
commit 65d6a5c6a8

View File

@ -72,8 +72,8 @@ func GetContainerOOMScoreAdjust(pod *v1.Pod, container *v1.Container, memoryCapa
return (1000 + guaranteedOOMScoreAdj)
}
// Give burstable pods a higher chance of survival over besteffort pods.
if int(oomScoreAdjust) >= besteffortOOMScoreAdj {
return int(besteffortOOMScoreAdj - 1)
if int(oomScoreAdjust) == besteffortOOMScoreAdj {
return int(oomScoreAdjust - 1)
}
return int(oomScoreAdjust)
}