Skip to content

Commit a24f787

Browse files
committed
[zh] sync storage/volumes
1 parent 0b7f73c commit a24f787

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

content/zh-cn/docs/concepts/storage/volumes.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,9 @@ Kubernetes {{< glossary_tooltip text="卷(Volume)" term_id="volume" >}}
4646

4747
<!--
4848
## 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.
5549
-->
5650
## 背景 {#background}
5751

58-
Docker 也有[卷(Volume)](https://docs.docker.com/storage/) 的概念,但对它只有少量且松散的管理。
59-
Docker 卷是磁盘上或者另外一个容器内的一个目录。
60-
Docker 提供卷驱动程序,但是其功能非常有限。
61-
6252
<!--
6353
Kubernetes supports many types of volumes. A {{< glossary_tooltip term_id="pod" text="Pod" >}}
6454
can use any number of volume types simultaneously.
@@ -510,14 +500,17 @@ keyed with `log_level`.
510500
* You must create a [ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/)
511501
before you can use it.
512502

503+
* A ConfigMap is always mounted as `readOnly`.
504+
513505
* A container using a ConfigMap as a [`subPath`](#using-subpath) volume mount will not
514506
receive ConfigMap updates.
515507

516508
* Text data is exposed as files using the UTF-8 character encoding. For other character encodings, use `binaryData`.
517509
-->
518510
{{< note >}}
519511
* 在使用 [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 的更新。
521514
* 文本数据挂载成文件时采用 UTF-8 字符编码。如果使用其他字符编码形式,可使用
522515
`binaryData` 字段。
523516
{{< /note >}}
@@ -1524,17 +1517,16 @@ API 服务器上,然后以文件的形式挂载到 Pod 中,无需直接与 K
15241517

15251518
{{< note >}}
15261519
<!--
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.
15311521

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
15351525
receive Secret updates.
15361526
-->
1537-
容器以 [`subPath`](#using-subpath) 卷挂载方式挂载 Secret 时,将感知不到 Secret 的更新。
1527+
* 使用前你必须在 Kubernetes API 中创建 Secret。
1528+
* Secret 总是以 `readOnly` 的模式挂载。
1529+
* 容器以 [`subPath`](#using-subpath) 卷挂载方式使用 Secret 时,将无法接收 Secret 的更新。
15381530
{{< /note >}}
15391531

15401532
<!--
@@ -1893,9 +1885,8 @@ persistent volume:
18931885

18941886
<!--
18951887
* `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`.
18991890
-->
19001891
* `readOnly`:一个可选的布尔值,指示通过 `ControllerPublished` 关联该卷时是否设置该卷为只读。默认值是 false。
19011892
该值通过 `ControllerPublishVolumeRequest` 中的 `readonly` 字段传递给 CSI 驱动。

0 commit comments

Comments
 (0)