Explicitly set LimitedSwap case with fallthrough

This commit is contained in:
Elana Hashman 2021-07-06 13:50:09 -07:00
parent 39f32d7286
commit 5584725605
No known key found for this signature in database
GPG Key ID: D37F7B2A20B48FA0

View File

@ -97,6 +97,8 @@ func (m *kubeGenericRuntimeManager) generateLinuxContainerConfig(container *v1.C
case kubelettypes.UnlimitedSwap:
// -1 = unlimited swap
lc.Resources.MemorySwapLimitInBytes = -1
case kubelettypes.LimitedSwap:
fallthrough
default:
// memorySwapLimit = total permitted memory+swap; if equal to memory limit, => 0 swap above memory limit
// Some swapping is still possible.