Skip to content

Commit b05919b

Browse files
authored
Merge pull request #43365 from tengqm/zh-resync-storage
[zh] Resync storage concepts pages
2 parents 6f4039b + 7ce291f commit b05919b

File tree

5 files changed

+34
-41
lines changed

5 files changed

+34
-41
lines changed

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

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -311,19 +311,18 @@ spec:
311311

312312
<!--
313313
The key design idea is that the
314-
[parameters for a volume claim](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ephemeralvolumesource-v1alpha1-core)
314+
[parameters for a volume claim](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ephemeralvolumesource-v1-core)
315315
are allowed inside a volume source of the Pod. Labels, annotations and
316316
the whole set of fields for a PersistentVolumeClaim are supported. When such a Pod gets
317317
created, the ephemeral volume controller then creates an actual PersistentVolumeClaim
318318
object in the same namespace as the Pod and ensures that the PersistentVolumeClaim
319319
gets deleted when the Pod gets deleted.
320320
-->
321321
关键的设计思想是在 Pod 的卷来源中允许使用
322-
[卷申领的参数](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ephemeralvolumesource-v1alpha1-core)。
322+
[卷申领的参数](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ephemeralvolumesource-v1-core)。
323323
PersistentVolumeClaim 的标签、注解和整套字段集均被支持。
324-
创建这样一个 Pod 后,
325-
临时卷控制器在 Pod 所属的命名空间中创建一个实际的 PersistentVolumeClaim 对象,
326-
并确保删除 Pod 时,同步删除 PersistentVolumeClaim。
324+
创建这样一个 Pod 后,临时卷控制器在 Pod 所属的命名空间中创建一个实际的
325+
PersistentVolumeClaim 对象,并确保删除 Pod 时,同步删除 PersistentVolumeClaim。
327326

328327
<!--
329328
That triggers volume binding and/or provisioning, either immediately if
@@ -336,8 +335,7 @@ access to the volume once it is available.
336335
-->
337336
如上设置将触发卷的绑定与/或制备,相应动作或者在
338337
{{< glossary_tooltip text="StorageClass" term_id="storage-class" >}}
339-
使用即时卷绑定时立即执行,
340-
或者当 Pod 被暂时性调度到某节点时执行 (`WaitForFirstConsumer` 卷绑定模式)。
338+
使用即时卷绑定时立即执行,或者当 Pod 被暂时性调度到某节点时执行 (`WaitForFirstConsumer` 卷绑定模式)。
341339
对于通用的临时卷,建议采用后者,这样调度器就可以自由地为 Pod 选择合适的节点。
342340
对于即时绑定,调度器则必须选出一个节点,使得在卷可用时,能立即访问该卷。
343341

@@ -355,8 +353,8 @@ and in this case you need to ensure that volume clean up happens separately.
355353
拥有通用临时存储的 Pod 是提供临时存储 (ephemeral storage) 的 PersistentVolumeClaim 的所有者。
356354
当 Pod 被删除时,Kubernetes 垃圾收集器会删除 PVC,
357355
然后 PVC 通常会触发卷的删除,因为存储类的默认回收策略是删除卷。
358-
你可以使用带有 `retain` 回收策略的 StorageClass 创建准临时 (quasi-ephemeral) 本地存储:
359-
该存储比 Pod 寿命长,在这种情况下,你需要确保单独进行卷清理。
356+
你可以使用带有 `retain` 回收策略的 StorageClass 创建准临时 (Quasi-Ephemeral) 本地存储:
357+
该存储比 Pod 寿命长,所以在这种情况下,你需要确保单独进行卷清理。
360358

361359
<!--
362360
While these PVCs exist, they can be used like any other PVC. In
@@ -382,7 +380,7 @@ interact with the PVC because one does not have to search for it once
382380
the Pod name and volume name are known.
383381
-->
384382
自动创建的 PVC 采取确定性的命名机制:名称是 Pod 名称和卷名称的组合,中间由连字符(`-`)连接。
385-
在上面的示例中,PVC 将命名为 `my-app-scratch-volume` 。
383+
在上面的示例中,PVC 将被命名为 `my-app-scratch-volume` 。
386384
这种确定性的命名机制使得与 PVC 交互变得更容易,因为一旦知道 Pod 名称和卷名,就不必搜索它。
387385

388386
<!--
@@ -391,10 +389,10 @@ Pods (a Pod "pod-a" with volume "scratch" and another Pod with name
391389
"pod" and volume "a-scratch" both end up with the same PVC name
392390
"pod-a-scratch") and between Pods and manually created PVCs.
393391
-->
394-
这种命名机制也引入了潜在的冲突,
395-
不同的 Pod 之间(名为 “Pod-a” 的 Pod 挂载名为 "scratch" 的卷,
396-
和名为 "pod" 的 Pod 挂载名为 “a-scratch” 的卷,这两者均会生成名为
397-
"pod-a-scratch" 的 PVC),或者在 Pod 和手工创建的 PVC 之间可能出现冲突。
392+
这种命名机制也引入了潜在的冲突,不同的 Pod 之间(名为 “Pod-a” 的
393+
Pod 挂载名为 "scratch" 的卷,和名为 "pod" 的 Pod 挂载名为 “a-scratch 的卷,
394+
这两者均会生成名为 "pod-a-scratch" 的 PVC),或者在 Pod 和手工创建的
395+
PVC 之间可能出现冲突。
398396

399397
<!--
400398
Such conflicts are detected: a PVC is only used for an ephemeral
@@ -403,15 +401,15 @@ ownership relationship. An existing PVC is not overwritten or
403401
modified. But this does not resolve the conflict because without the
404402
right PVC, the Pod cannot start.
405403
-->
406-
以下冲突会被检测到:如果 PVC 是为 Pod 创建的,那么它只用于临时卷。
404+
这类冲突会被检测到:如果 PVC 是为 Pod 创建的,那么它只用于临时卷。
407405
此检测基于所有权关系。现有的 PVC 不会被覆盖或修改。
408406
但这并不能解决冲突,因为如果没有正确的 PVC,Pod 就无法启动。
409407

408+
{{< caution >}}
410409
<!--
411410
Take care when naming Pods and volumes inside the
412411
same namespace, so that these conflicts can't occur.
413412
-->
414-
{{< caution >}}
415413
当同一个命名空间中命名 Pod 和卷时,要小心,以防止发生此类冲突。
416414
{{< /caution >}}
417415

@@ -461,7 +459,7 @@ See [local ephemeral storage](/docs/concepts/configuration/manage-resources-cont
461459

462460
- 有关设计的更多信息,参阅
463461
[Ephemeral Inline CSI volumes KEP](https://github.com/kubernetes/enhancements/blob/ad6021b3d61a49040a3f835e12c8bb5424db2bbb/keps/sig-storage/20190122-csi-inline-volumes.md)。
464-
- 本特性下一步开发的更多信息,参阅
462+
- 关于本特性下一步开发的更多信息,参阅
465463
[enhancement tracking issue #596](https://github.com/kubernetes/enhancements/issues/596)。
466464

467465
<!--

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

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -925,13 +925,13 @@ Older versions of Kubernetes also supported the following in-tree PersistentVolu
925925
(**not available** in v1.26)
926926
* `photonPersistentDisk` - Photon controller persistent disk.
927927
(**not available** starting v1.15)
928-
* [`scaleIO`](/docs/concepts/storage/volumes/#scaleio) - ScaleIO volume
928+
* `scaleIO` - ScaleIO volume
929929
(**not available** starting v1.21)
930-
* [`flocker`](/docs/concepts/storage/volumes/#flocker) - Flocker storage
930+
* `flocker` - Flocker storage
931931
(**not available** starting v1.25)
932-
* [`quobyte`](/docs/concepts/storage/volumes/#quobyte) - Quobyte volume
932+
* `quobyte` - Quobyte volume
933933
(**not available** starting v1.25)
934-
* [`storageos`](/docs/concepts/storage/volumes/#storageos) - StorageOS volume
934+
* `storageos` - StorageOS volume
935935
(**not available** starting v1.25)
936936
-->
937937
旧版本的 Kubernetes 仍支持这些“树内(In-Tree)”持久卷类型:
@@ -943,13 +943,10 @@ Older versions of Kubernetes also supported the following in-tree PersistentVolu
943943
* [`cinder`](/zh-cn/docs/concepts/storage/volumes/#cinder) - Cinder (OpenStack block storage)
944944
(v1.27 开始**不可用**)
945945
* `photonPersistentDisk` - Photon 控制器持久化盘。(从 v1.15 版本开始将**不可用**)
946-
* [`scaleIO`](/zh-cn/docs/concepts/storage/volumes/#scaleio) - ScaleIO 卷(v1.21 之后**不可用**)
947-
* [`flocker`](/zh-cn/docs/concepts/storage/volumes/#flocker) - Flocker 存储
948-
(v1.25 之后**不可用**)
949-
* [`quobyte`](/zh-cn/docs/concepts/storage/volumes/#quobyte) - Quobyte 卷
950-
(v1.25 之后**不可用**)
951-
* [`storageos`](/zh-cn/docs/concepts/storage/volumes/#storageos) - StorageOS 卷
952-
(v1.25 之后**不可用**)
946+
* `scaleIO` - ScaleIO 卷(v1.21 之后**不可用**)
947+
* `flocker` - Flocker 存储 (v1.25 之后**不可用**)
948+
* `quobyte` - Quobyte 卷 (v1.25 之后**不可用**)
949+
* `storageos` - StorageOS 卷 (v1.25 之后**不可用**)
953950

954951
<!--
955952
## Persistent Volumes

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ see the [all-in-one volume](https://git.k8s.io/design-proposals-archive/node/all
5959
-->
6060
### 带有 Secret、DownwardAPI 和 ConfigMap 的配置示例 {#example-configuration-secret-downwardapi-configmap}
6161

62-
{{< codenew file="pods/storage/projected-secret-downwardapi-configmap.yaml" >}}
62+
{{% code_sample file="pods/storage/projected-secret-downwardapi-configmap.yaml" %}}
6363

6464
<!--
6565
### Example configuration: secrets with a non-default permission mode set {#example-configuration-secrets-nondefault-permission-mode}
6666
-->
6767
### 带有非默认权限模式设置的 Secret 的配置示例 {#example-configuration-secrets-nondefault-permission-mode}
6868

69-
{{< codenew file="pods/storage/projected-secrets-nondefault-permission-mode.yaml" >}}
69+
{{% code_sample file="pods/storage/projected-secrets-nondefault-permission-mode.yaml" %}}
7070

7171
<!--
7272
Each projected volume source is listed in the spec under `sources`. The
@@ -94,7 +94,7 @@ into a Pod at a specified path. For example:
9494
你可以将当前[服务账号](/zh-cn/docs/reference/access-authn-authz/authentication/#service-account-tokens)的令牌注入到
9595
Pod 中特定路径下。例如:
9696

97-
{{< codenew file="pods/storage/projected-service-account-token.yaml" >}}
97+
{{% code_sample file="pods/storage/projected-service-account-token.yaml" %}}
9898

9999
<!--
100100
The example Pod has a projected volume containing the injected service account

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@ class needs to be dynamically provisioned.
5757
<!--
5858
The name of a StorageClass object is significant, and is how users can
5959
request a particular class. Administrators set the name and other parameters
60-
of a class when first creating StorageClass objects, and the objects cannot
61-
be updated once they are created.
60+
of a class when first creating StorageClass objects.
6261
-->
6362
StorageClass 对象的命名很重要,用户使用这个命名来请求生成一个特定的类。
64-
当创建 StorageClass 对象时,管理员设置 StorageClass 对象的命名和其他参数,
65-
一旦创建了对象就不能再对其更新。
63+
当创建 StorageClass 对象时,管理员设置 StorageClass 对象的命名和其他参数。
6664

6765
<!--
6866
Administrators can specify a default StorageClass only for PVCs that don't

content/zh-cn/docs/concepts/storage/volume-snapshot-classes.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,19 @@ used for provisioning VolumeSnapshots. This field must be specified.
105105
<!--
106106
### DeletionPolicy
107107
108-
Volume snapshot classes have a deletionPolicy. It enables you to configure what
109-
happens to a VolumeSnapshotContent when the VolumeSnapshot object it is bound to
110-
is to be deleted. The deletionPolicy of a volume snapshot class can either be
111-
`Retain` or `Delete`. This field must be specified.
108+
Volume snapshot classes have a [deletionPolicy](/docs/concepts/storage/volume-snapshots/#delete).
109+
It enables you to configure what happens to a VolumeSnapshotContent when the VolumeSnapshot
110+
object it is bound to is to be deleted. The deletionPolicy of a volume snapshot class can
111+
either be `Retain` or `Delete`. This field must be specified.
112112

113113
If the deletionPolicy is `Delete`, then the underlying storage snapshot will be
114114
deleted along with the VolumeSnapshotContent object. If the deletionPolicy is `Retain`,
115115
then both the underlying snapshot and VolumeSnapshotContent remain.
116116
-->
117117
### 删除策略 {#deletion-policy}
118118

119-
卷快照类具有 `deletionPolicy` 属性。用户可以配置当所绑定的 VolumeSnapshot
120-
对象将被删除时,如何处理 VolumeSnapshotContent 对象。
119+
卷快照类具有 [deletionPolicy] 属性(/zh-cn/docs/concepts/storage/volume-snapshots/#delete)。
120+
用户可以配置当所绑定的 VolumeSnapshot 对象将被删除时,如何处理 VolumeSnapshotContent 对象。
121121
卷快照类的这个策略可以是 `Retain` 或者 `Delete`。这个策略字段必须指定。
122122

123123
如果删除策略是 `Delete`,那么底层的存储快照会和 VolumeSnapshotContent 对象

0 commit comments

Comments
 (0)