Skip to content

Commit 54c1b88

Browse files
committed
[zh]Update ephemeral-volumes.md
Signed-off-by: xin.li <[email protected]>
1 parent d4a878d commit 54c1b88

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

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

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ metadata:
183183
spec:
184184
containers:
185185
- name: my-frontend
186-
image: busybox
186+
image: busybox:1.28
187187
volumeMounts:
188188
- mountPath: "/data"
189189
name: my-csi-inline-vol
@@ -202,18 +202,32 @@ driver. These attributes are specific to each driver and not
202202
standardized. See the documentation of each CSI driver for further
203203
instructions.
204204

205-
As a cluster administrator, you can use a [PodSecurityPolicy](/docs/concepts/policy/pod-security-policy/) to control which CSI drivers can be used in a Pod, specified with the
205+
### CSI driver restrictions
206+
207+
As a cluster administrator, you can use a [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/) to control which CSI drivers can be used in a Pod, specified with the
206208
[`allowedCSIDrivers` field](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicyspec-v1beta1-policy).
209+
210+
{{< note >}}
211+
PodSecurityPolicy is deprecated and will be removed in the Kubernetes v1.25 release.
212+
{{< /note >}}
207213
-->
208214
`volumeAttributes` 决定驱动程序准备什么样的卷。这些属性特定于每个驱动程序,且没有实现标准化。
209215
有关进一步的说明,请参阅每个 CSI 驱动程序的文档。
210216

217+
### CSI 驱动程序限制
218+
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
219+
211220
作为一个集群管理员,你可以使用
212-
[PodSecurityPolicy](/zh/docs/concepts/policy/pod-security-policy/)
221+
[PodSecurityPolicy](/zh/docs/concepts/security/pod-security-policy/)
213222
来控制在 Pod 中可以使用哪些 CSI 驱动程序,
214223
具体则是通过 [`allowedCSIDrivers` 字段](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicyspec-v1beta1-policy)
215224
指定。
216225

226+
{{< note >}}
227+
PodSecurityPolicy 已弃用,并将在 Kubernetes v1.25 版本中移除。
228+
{{< /note >}}
229+
230+
217231
<!--
218232
### Generic ephemeral volumes
219233
-->
@@ -262,7 +276,7 @@ metadata:
262276
spec:
263277
containers:
264278
- name: my-frontend
265-
image: busybox
279+
image: busybox:1.28
266280
volumeMounts:
267281
- mountPath: "/scratch"
268282
name: scratch-volume
@@ -411,20 +425,20 @@ two choices:
411425
如果这不符合他们的安全模型,他们有如下选择:
412426

413427
<!--
428+
- Use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/)
429+
that rejects objects like Pods that have a generic ephemeral
430+
volume.
414431
- Use a [Pod Security
415432
Policy](/docs/concepts/policy/pod-security-policy/) where the
416433
`volumes` list does not contain the `ephemeral` volume type
417434
(deprecated in Kubernetes 1.21).
418-
- Use an [admission webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/)
419-
which rejects objects like Pods that have a generic ephemeral
420-
volume.
421435
-->
422436
- 通过特性门控显式禁用该特性。
437+
- 使用一个[准入 Webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/)
438+
拒绝包含通用临时卷的 Pods。
423439
- 当 `volumes` 列表不包含 `ephemeral` 卷类型时,使用
424440
[Pod 安全策略](/zh/docs/concepts/policy/pod-security-policy/)。
425441
(这一方式在 Kubernetes 1.21 版本已经弃用)
426-
- 使用一个[准入 Webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/)
427-
拒绝包含通用临时卷的 Pods。
428442

429443
<!--
430444
The normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#storage-resource-quota) still applies, so

0 commit comments

Comments
 (0)