@@ -2162,15 +2162,25 @@ in `Container.volumeMounts`. Its values are:
2162
2162
In similar fashion, no mounts created by the container will be visible on
2163
2163
the host. This is the default mode.
2164
2164
2165
- This mode is equal to `private` mount propagation as described in the
2166
- [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)
2165
+ This mode is equal to `rprivate` mount propagation as described in
2166
+ [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)
2167
+
2168
+ However, the CRI runtime may choose `rslave` mount propagation (i.e.,
2169
+ ` HostToContainer` ) instead, when `rprivate` propagation is not applicable.
2170
+ cri-dockerd (Docker) is known to choose `rslave` mount propagation when the
2171
+ mount source contains the Docker daemon's root directory (`/var/lib/docker`).
2167
2172
-->
2168
2173
2169
2174
* `None` - 此卷挂载将不会感知到主机后续在此卷或其任何子目录上执行的挂载变化。
2170
2175
类似的,容器所创建的卷挂载在主机上是不可见的。这是默认模式。
2171
2176
2172
- 该模式等同于 [Linux 内核文档](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt)中描述的
2173
- ` private` 挂载传播选项。
2177
+ 该模式等同于 [`mount(8)`](https://man7.org/linux/man-pages/man8/mount.8.html)中描述的
2178
+ ` rprivate` 挂载传播选项。
2179
+
2180
+ 然而,当 `rprivate` 传播选项不适用时,CRI 运行时可以转为选择 `rslave` 挂载传播选项
2181
+ (即 `HostToContainer`)。当挂载源包含 Docker 守护进程的根目录(`/var/lib/docker`)时,
2182
+ cri-dockerd (Docker) 已知可以选择 `rslave` 挂载传播选项。
2183
+ 。
2174
2184
2175
2185
<!--
2176
2186
* `HostToContainer` - This volume mount will receive all subsequent mounts
@@ -2184,7 +2194,7 @@ in `Container.volumeMounts`. Its values are:
2184
2194
propagation will see it.
2185
2195
2186
2196
This mode is equal to `rslave` mount propagation as described in the
2187
- [Linux kernel documentation ](https://www.kernel. org/doc/Documentation/filesystems/sharedsubtree.txt )
2197
+ [`mount(8)` ](https://man7. org/linux/man-pages/man8/mount.8.html )
2188
2198
-->
2189
2199
* `HostToContainer` - 此卷挂载将会感知到主机后续针对此卷或其任何子目录的挂载操作。
2190
2200
@@ -2193,7 +2203,7 @@ in `Container.volumeMounts`. Its values are:
2193
2203
类似的,配置了 `Bidirectional` 挂载传播选项的 Pod 如果在同一卷上挂载了内容,挂载传播设置为
2194
2204
` HostToContainer` 的容器都将能看到这一变化。
2195
2205
2196
- 该模式等同于 [Linux 内核文档 ](https://www.kernel. org/doc/Documentation/filesystems/sharedsubtree.txt )中描述的
2206
+ 该模式等同于 [`mount(8)` ](https://man7. org/linux/man-pages/man8/mount.8.html )中描述的
2197
2207
` rslave` 挂载传播选项。
2198
2208
2199
2209
<!--
@@ -2205,12 +2215,12 @@ in `Container.volumeMounts`. Its values are:
2205
2215
a Pod that needs to mount something on the host using a `hostPath` volume.
2206
2216
2207
2217
This mode is equal to `rshared` mount propagation as described in the
2208
- [Linux kernel documentation ](https://www.kernel. org/doc/Documentation/filesystems/sharedsubtree.txt )
2218
+ [`mount(8)` ](https://man7. org/linux/man-pages/man8/mount.8.html )
2209
2219
-->
2210
2220
* `Bidirectional` - 这种卷挂载和 `HostToContainer` 挂载表现相同。
2211
2221
另外,容器创建的卷挂载将被传播回至主机和使用同一卷的所有 Pod 的所有容器。
2212
2222
2213
- 该模式等同于 [Linux 内核文档 ](https://www.kernel. org/doc/Documentation/filesystems/sharedsubtree.txt )中描述的
2223
+ 该模式等同于 [`mount(8)` ](https://man7. org/linux/man-pages/man8/mount.8.html )中描述的
2214
2224
` rshared` 挂载传播选项。
2215
2225
2216
2226
{{< warning >}}
0 commit comments