Commit e417fd2f authored by Jun Gong's avatar Jun Gong

Small improve for GetContainerOOMScoreAdjust

parent 99939d36
...@@ -72,8 +72,8 @@ func GetContainerOOMScoreAdjust(pod *v1.Pod, container *v1.Container, memoryCapa ...@@ -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)
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment