mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-30 13:48:50 +00:00
Automatic merge from submit-queue Make /var/lib/kubelet as shared during startup This is part of ~~https://github.com/kubernetes/community/pull/589~~ https://github.com/kubernetes/community/pull/659 We'd like kubelet to be able to consume mounts from containers in the future, therefore kubelet should make sure that `/var/lib/kubelet` has shared mount propagation to be able to see these mounts. On most distros, root directory is already mounted with shared mount propagation and this code will not do anything. On older distros such as Debian Wheezy, this code detects that `/var/lib/kubelet` is a directory on `/` which has private mount propagation and kubelet bind-mounts `/var/lib/kubelet` as rshared. Both "regular" linux mounter and `NsenterMounter` are updated here. @kubernetes/sig-storage-pr-reviews @kubernetes/sig-node-pr-reviews @vishh Release note: ```release-note Kubelet re-binds /var/lib/kubelet directory with rshared mount propagation during startup if it is not shared yet. ```