mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +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)
|
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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user