mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Exclude critical pods from having swap access
Signed-off-by: Itamar Holder <iholder@redhat.com>
This commit is contained in:
parent
8b8f84c6a7
commit
532cd5f84c
@ -180,6 +180,11 @@ func (m *kubeGenericRuntimeManager) configureContainerSwapResources(lcr *runtime
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if kubelettypes.IsCriticalPod(pod) {
|
||||||
|
swapConfigurationHelper.ConfigureNoSwap(lcr)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// NOTE(ehashman): Behavior is defined in the opencontainers runtime spec:
|
// NOTE(ehashman): Behavior is defined in the opencontainers runtime spec:
|
||||||
// https://github.com/opencontainers/runtime-spec/blob/1c3f411f041711bbeecf35ff7e93461ea6789220/config-linux.md#memory
|
// https://github.com/opencontainers/runtime-spec/blob/1c3f411f041711bbeecf35ff7e93461ea6789220/config-linux.md#memory
|
||||||
switch m.memorySwapBehavior {
|
switch m.memorySwapBehavior {
|
||||||
|
Loading…
Reference in New Issue
Block a user