Small improve for GetContainerOOMScoreAdjust

This commit is contained in:
Jun Gong 2016-12-29 21:25:43 +08:00
parent 99939d360a
commit e417fd2faa

View File

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