@@ -46,19 +46,9 @@ Kubernetes {{< glossary_tooltip text="卷(Volume)" term_id="volume" >}}
46
46
47
47
<!--
48
48
## Background
49
-
50
- Docker has a concept of
51
- [volumes](https://docs.docker.com/storage/), though it is
52
- somewhat looser and less managed. A Docker volume is a directory on
53
- disk or in another container. Docker provides volume
54
- drivers, but the functionality is somewhat limited.
55
49
-->
56
50
## 背景 {#background}
57
51
58
- Docker 也有[ 卷(Volume)] ( https://docs.docker.com/storage/ ) 的概念,但对它只有少量且松散的管理。
59
- Docker 卷是磁盘上或者另外一个容器内的一个目录。
60
- Docker 提供卷驱动程序,但是其功能非常有限。
61
-
62
52
<!--
63
53
Kubernetes supports many types of volumes. A {{< glossary_tooltip term_id="pod" text="Pod" >}}
64
54
can use any number of volume types simultaneously.
@@ -510,14 +500,17 @@ keyed with `log_level`.
510
500
* You must create a [ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/)
511
501
before you can use it.
512
502
503
+ * A ConfigMap is always mounted as `readOnly`.
504
+
513
505
* A container using a ConfigMap as a [`subPath`](#using-subpath) volume mount will not
514
506
receive ConfigMap updates.
515
507
516
508
* Text data is exposed as files using the UTF-8 character encoding. For other character encodings, use `binaryData`.
517
509
-->
518
510
{{< note >}}
519
511
* 在使用 [ConfigMap](/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap/) 之前你首先要创建它。
520
- * 容器以 [subPath](#using-subpath) 卷挂载方式使用 ConfigMap 时,将无法接收 ConfigMap 的更新。
512
+ * ConfigMap 总是以 `readOnly` 的模式挂载。
513
+ * 容器以 [`subPath`](#using-subpath) 卷挂载方式使用 ConfigMap 时,将无法接收 ConfigMap 的更新。
521
514
* 文本数据挂载成文件时采用 UTF-8 字符编码。如果使用其他字符编码形式,可使用
522
515
` binaryData` 字段。
523
516
{{< /note >}}
@@ -1524,17 +1517,16 @@ API 服务器上,然后以文件的形式挂载到 Pod 中,无需直接与 K
1524
1517
1525
1518
{{< note >}}
1526
1519
<!--
1527
- You must create a Secret in the Kubernetes API before you can use it.
1528
- -->
1529
- 使用前你必须在 Kubernetes API 中创建 Secret。
1530
- {{< /note >}}
1520
+ * You must create a Secret in the Kubernetes API before you can use it.
1531
1521
1532
- {{< note >}}
1533
- <!--
1534
- A container using a Secret as a [`subPath`](#using-subpath) volume mount will not
1522
+ * A Secret is always mounted as `readOnly`.
1523
+
1524
+ * A container using a Secret as a [`subPath`](#using-subpath) volume mount will not
1535
1525
receive Secret updates.
1536
1526
-->
1537
- 容器以 [`subPath`](#using-subpath) 卷挂载方式挂载 Secret 时,将感知不到 Secret 的更新。
1527
+ * 使用前你必须在 Kubernetes API 中创建 Secret。
1528
+ * Secret 总是以 `readOnly` 的模式挂载。
1529
+ * 容器以 [`subPath`](#using-subpath) 卷挂载方式使用 Secret 时,将无法接收 Secret 的更新。
1538
1530
{{< /note >}}
1539
1531
1540
1532
<!--
@@ -1893,9 +1885,8 @@ persistent volume:
1893
1885
1894
1886
<!--
1895
1887
* `readOnly`: An optional boolean value indicating whether the volume is to be
1896
- " ControllerPublished" (attached) as read only. Default is false. This value is
1897
- passed to the CSI driver via the `readonly` field in the
1898
- ` ControllerPublishVolumeRequest` .
1888
+ " ControllerPublished" (attached) as read only. Default is false. This value is passed
1889
+ to the CSI driver via the `readonly` field in the `ControllerPublishVolumeRequest`.
1899
1890
-->
1900
1891
* `readOnly`:一个可选的布尔值,指示通过 `ControllerPublished` 关联该卷时是否设置该卷为只读。默认值是 false。
1901
1892
该值通过 `ControllerPublishVolumeRequest` 中的 `readonly` 字段传递给 CSI 驱动。
0 commit comments