@@ -49,26 +49,28 @@ type Nsenter = NSEnter
4949//
5050// NSEnter requires:
5151//
52- // 1. Docker >= 1.6 due to the dependency on the slave propagation mode
52+ // 1. Docker >= 1.6 due to the dependency on the slave propagation mode
5353// of the bind-mount of the kubelet root directory in the container.
5454// Docker 1.5 used a private propagation mode for bind-mounts, so mounts
5555// performed in the host's mount namespace do not propagate out to the
5656// bind-mount in this docker version.
57- // 2. The host's root filesystem must be available at /rootfs
58- // 3. The nsenter binary must be on the Kubelet process' PATH in the container's
57+ // 2. The host's root filesystem must be available at /rootfs
58+ // 3. The nsenter binary must be on the Kubelet process' PATH in the container's
5959// filesystem.
60- // 4. The Kubelet process must have CAP_SYS_ADMIN (required by nsenter); at
60+ // 4. The Kubelet process must have CAP_SYS_ADMIN (required by nsenter); at
6161// the present, this effectively means that the kubelet is running in a
6262// privileged container.
63- // 5. The volume path used by the Kubelet must be the same inside and outside
63+ // 5. The volume path used by the Kubelet must be the same inside and outside
6464// the container and be writable by the container (to initialize volume)
6565// contents. TODO: remove this requirement.
66- // 6. The host image must have "mount", "findmnt", "umount", "stat", "touch",
66+ // 6. The host image must have "mount", "findmnt", "umount", "stat", "touch",
6767// "mkdir", "ls", "sh" and "chmod" binaries in /bin, /usr/sbin, or /usr/bin
68- // 7. The host image should have systemd-run in /bin, /usr/sbin, or /usr/bin if
68+ // 7. The host image should have systemd-run in /bin, /usr/sbin, or /usr/bin if
6969// systemd is installed/enabled in the operating system.
70+ //
7071// For more information about mount propagation modes, see:
71- // https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt
72+ //
73+ // https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt
7274type NSEnter struct {
7375 // a map of commands to their paths on the host filesystem
7476 paths map [string ]string
@@ -174,10 +176,13 @@ func (ne *NSEnter) SupportsSystemd() (string, bool) {
174176// exist. When it's false, it evaluates symlinks of the existing part and
175177// blindly adds the non-existing part:
176178// pathname: /mnt/volume/non/existing/directory
177- // /mnt/volume exists
178- // non/existing/directory does not exist
179+ //
180+ // /mnt/volume exists
181+ // non/existing/directory does not exist
182+ //
179183// -> It resolves symlinks in /mnt/volume to say /mnt/foo and returns
180- // /mnt/foo/non/existing/directory.
184+ //
185+ // /mnt/foo/non/existing/directory.
181186//
182187// BEWARE! EvalSymlinks is not able to detect symlink looks with mustExist=false!
183188// If /tmp/link is symlink to /tmp/link, EvalSymlinks(/tmp/link/foo) returns /tmp/link/foo.
0 commit comments