mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-09 16:16:23 +00:00
Automatic merge from submit-queue (batch tested with PRs 48487, 49009, 49862, 49843, 49700) validate cadvisor rootpath **What this PR does / why we need it**: When working on issue #48452, I found [KubeletConfiguration.RootDirectory](https://github.com/kubernetes/kubernetes/blob/master/cmd/kubelet/app/server.go#L525) was never been validated. The default value is set to ["/var/lib/kubelet"](https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/componentconfig/v1alpha1/defaults.go#L342). If this directory does not exist in the file system, the [cadvisor.manager](https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/google/cadvisor/manager/manager.go#L679) will fail to gather the information for metrics. > error trying to get filesystem Device for dir /var/lib/kubelet: err: stat failed on /var/lib/kubelet with error: no such file or directory **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: /cc @feiskyer @k82cn **Release note**: ```release-note validate cadvisor rootpath ```