Merge pull request #71269 from DeliangFan/adjust_oom_score_adj
Set the oom_score_adj of guaranteed pod to -997
This commit is contained in:
@@ -27,7 +27,7 @@ const (
|
|||||||
KubeletOOMScoreAdj int = -999
|
KubeletOOMScoreAdj int = -999
|
||||||
// KubeProxyOOMScoreAdj is the OOM score adjustment for kube-proxy
|
// KubeProxyOOMScoreAdj is the OOM score adjustment for kube-proxy
|
||||||
KubeProxyOOMScoreAdj int = -999
|
KubeProxyOOMScoreAdj int = -999
|
||||||
guaranteedOOMScoreAdj int = -998
|
guaranteedOOMScoreAdj int = -997
|
||||||
besteffortOOMScoreAdj int = 1000
|
besteffortOOMScoreAdj int = 1000
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -187,8 +187,8 @@ func TestGetContainerOOMScoreAdjust(t *testing.T) {
|
|||||||
{
|
{
|
||||||
pod: &equalRequestLimitCPUMemory,
|
pod: &equalRequestLimitCPUMemory,
|
||||||
memoryCapacity: 123456789,
|
memoryCapacity: 123456789,
|
||||||
lowOOMScoreAdj: -998,
|
lowOOMScoreAdj: -997,
|
||||||
highOOMScoreAdj: -998,
|
highOOMScoreAdj: -997,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pod: &cpuUnlimitedMemoryLimitedWithRequests,
|
pod: &cpuUnlimitedMemoryLimitedWithRequests,
|
||||||
@@ -199,14 +199,14 @@ func TestGetContainerOOMScoreAdjust(t *testing.T) {
|
|||||||
{
|
{
|
||||||
pod: &requestNoLimit,
|
pod: &requestNoLimit,
|
||||||
memoryCapacity: standardMemoryAmount,
|
memoryCapacity: standardMemoryAmount,
|
||||||
lowOOMScoreAdj: 2,
|
lowOOMScoreAdj: 3,
|
||||||
highOOMScoreAdj: 2,
|
highOOMScoreAdj: 3,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pod: &critical,
|
pod: &critical,
|
||||||
memoryCapacity: 4000000000,
|
memoryCapacity: 4000000000,
|
||||||
lowOOMScoreAdj: -998,
|
lowOOMScoreAdj: -997,
|
||||||
highOOMScoreAdj: -998,
|
highOOMScoreAdj: -997,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, test := range oomTests {
|
for _, test := range oomTests {
|
||||||
|
Reference in New Issue
Block a user