Skip to content

Commit

Permalink
Explicitly set LimitedSwap case with fallthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
ehashman committed Jul 6, 2021
1 parent 39f32d7 commit 5584725
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kubelet/kuberuntime/kuberuntime_container_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5584725

Please sign in to comment.