Merge pull request #109347 from HirazawaUi/master

the err of "GetKubeletContainer" function should not affect the value of "RuntimeCgroups"
This commit is contained in:
Kubernetes Prow Robot 2022-07-29 13:17:35 -07:00 committed by GitHub
commit d05780e38d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -622,9 +622,7 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend
cgroupRoots = append(cgroupRoots, kubeletCgroup)
}
if err != nil {
klog.InfoS("Failed to get the container runtime's cgroup. Runtime system container metrics may be missing.", "err", err)
} else if s.RuntimeCgroups != "" {
if s.RuntimeCgroups != "" {
// RuntimeCgroups is optional, so ignore if it isn't specified
cgroupRoots = append(cgroupRoots, s.RuntimeCgroups)
}