Set the oom_score_adj of guaranteed pod to -997
When oom happens, the sandbox maybe killed first, so set the oom score of guaranteed pod to -997.
This commit is contained in:
@@ -187,8 +187,8 @@ func TestGetContainerOOMScoreAdjust(t *testing.T) {
|
||||
{
|
||||
pod: &equalRequestLimitCPUMemory,
|
||||
memoryCapacity: 123456789,
|
||||
lowOOMScoreAdj: -998,
|
||||
highOOMScoreAdj: -998,
|
||||
lowOOMScoreAdj: -997,
|
||||
highOOMScoreAdj: -997,
|
||||
},
|
||||
{
|
||||
pod: &cpuUnlimitedMemoryLimitedWithRequests,
|
||||
@@ -199,14 +199,14 @@ func TestGetContainerOOMScoreAdjust(t *testing.T) {
|
||||
{
|
||||
pod: &requestNoLimit,
|
||||
memoryCapacity: standardMemoryAmount,
|
||||
lowOOMScoreAdj: 2,
|
||||
highOOMScoreAdj: 2,
|
||||
lowOOMScoreAdj: 3,
|
||||
highOOMScoreAdj: 3,
|
||||
},
|
||||
{
|
||||
pod: &critical,
|
||||
memoryCapacity: 4000000000,
|
||||
lowOOMScoreAdj: -998,
|
||||
highOOMScoreAdj: -998,
|
||||
lowOOMScoreAdj: -997,
|
||||
highOOMScoreAdj: -997,
|
||||
},
|
||||
}
|
||||
for _, test := range oomTests {
|
||||
|
Reference in New Issue
Block a user