Fix s.RuntimeCgroups error condition
This commit is contained in:
		@@ -621,9 +621,7 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend
 | 
				
			|||||||
		cgroupRoots = append(cgroupRoots, kubeletCgroup)
 | 
							cgroupRoots = append(cgroupRoots, kubeletCgroup)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err != nil {
 | 
						if s.RuntimeCgroups != "" {
 | 
				
			||||||
		klog.InfoS("Failed to get the container runtime's cgroup. Runtime system container metrics may be missing.", "err", err)
 | 
					 | 
				
			||||||
	} else if s.RuntimeCgroups != "" {
 | 
					 | 
				
			||||||
		// RuntimeCgroups is optional, so ignore if it isn't specified
 | 
							// RuntimeCgroups is optional, so ignore if it isn't specified
 | 
				
			||||||
		cgroupRoots = append(cgroupRoots, s.RuntimeCgroups)
 | 
							cgroupRoots = append(cgroupRoots, s.RuntimeCgroups)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user