mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Fix s.RuntimeCgroups error condition
This commit is contained in:
parent
dbb6c77de4
commit
7f375e4ff0
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user