mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 21:36:24 +00:00
Avoid logging that swap cgroup controller is missing for every container
Signed-off-by: Itamar Holder <iholder@redhat.com>
This commit is contained in:
parent
546f7c3086
commit
f6e537d7a1
@ -164,9 +164,9 @@ func (m *kubeGenericRuntimeManager) generateLinuxContainerResources(pod *v1.Pod,
|
||||
// Swap is only configured if a swap cgroup controller is available and the NodeSwap feature gate is enabled.
|
||||
func (m *kubeGenericRuntimeManager) configureContainerSwapResources(lcr *runtimeapi.LinuxContainerResources, pod *v1.Pod, container *v1.Container) {
|
||||
if !swapControllerAvailable() {
|
||||
klog.InfoS("No swap cgroup controller present", "swapBehavior", m.memorySwapBehavior, "pod", klog.KObj(pod), "containerName", container.Name)
|
||||
return
|
||||
}
|
||||
|
||||
swapConfigurationHelper := newSwapConfigurationHelper(*m.machineInfo)
|
||||
if m.memorySwapBehavior == kubelettypes.LimitedSwap {
|
||||
if !isCgroup2UnifiedMode() {
|
||||
|
Loading…
Reference in New Issue
Block a user