mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #123749 from iholder101/swap_log/only_once_avoid_spam
[KEP2400] Avoid logging that swap cgroup controller is missing for every container
This commit is contained in:
		@@ -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() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user