mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Small improve for GetContainerOOMScoreAdjust
This commit is contained in:
parent
99939d360a
commit
e417fd2faa
@ -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(oomScoreAdjust - 1)
|
||||
if int(oomScoreAdjust) >= besteffortOOMScoreAdj {
|
||||
return int(besteffortOOMScoreAdj - 1)
|
||||
}
|
||||
return int(oomScoreAdjust)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user