From f19fc35059cef4bb275dffb4b83639022cca4851 Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Fri, 24 Jun 2022 17:29:53 +0800 Subject: [PATCH] [zh-cn] Resync Pod security admission page --- .../security/pod-security-admission.md | 47 +++++++++---------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/content/zh-cn/docs/concepts/security/pod-security-admission.md b/content/zh-cn/docs/concepts/security/pod-security-admission.md index 69f629ee68..9a3d6533d8 100644 --- a/content/zh-cn/docs/concepts/security/pod-security-admission.md +++ b/content/zh-cn/docs/concepts/security/pod-security-admission.md @@ -56,29 +56,27 @@ PodSecurityPolicy API 已经被废弃,会在 Kubernetes v1.25 发行版中 +## {{% heading "prerequisites" %}} + -## {{% heading "prerequisites" %}} - 要使用此机制,你的集群必须强制执行 Pod 安全准入。 -### 内置 Pod 安全准入强制执行 - -在 Kubernetes v{{< skew currentVersion >}} 中,`PodSecurity` +### 内置 Pod 安全准入强制执行 + +在 Kubernetes v1.23 中,`PodSecurity` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)是一项 Beta 特性, -默认被启用。你必须启用此功能门控。如果你运行的是不同版本的 Kubernetes,请查阅该版本的文档。 - - +默认被启用。 +本页面是 Kubernetes v{{< skew currentVersion >}} 文档的一部分。 +如果你运行的是其它版本的 Kubernetes,请查阅该版本的文档。 在 [https://git.k8s.io/pod-security-admission/webhook](https://git.k8s.io/pod-security-admission/webhook) 上可以找到一个预先构建的容器镜像、证书生成脚本以及一些示例性质的清单。 +执行下面的命令来安装: ```shell git clone git@github.com:kubernetes/pod-security-admission.git @@ -158,13 +157,11 @@ Kubernetes 定义了一组{{< glossary_tooltip term_id="label" text="标签" >}} 要采取什么样的动作。 {{< table caption="Pod 安全准入模式" >}} 模式 | 描述 @@ -198,7 +195,7 @@ pod-security.kubernetes.io/: pod-security.kubernetes.io/-version: --> ``` -# 针对模式的级别标签用来标示针对该模式所应用的策略级别 +# 模式的级别标签用来标示对应模式所应用的策略级别 # # MODE 必须是 `enforce`、`audit` 或 `warn` 之一 # LEVEL 必须是 `privileged`、baseline` 或 `restricted` 之一 @@ -215,8 +212,7 @@ pod-security.kubernetes.io/-version: -关于用法示例,可参阅 -[使用名字空间标签来强制实施 Pod 安全标准](/zh-cn/docs/tasks/configure-pod-container/enforce-standards-namespace-labels/)。 +关于用法示例,可参阅[使用名字空间标签来强制实施 Pod 安全标准](/zh-cn/docs/tasks/configure-pod-container/enforce-standards-namespace-labels/)。 ## 豁免 {#exemptions} -你可以为 Pod 安全性的实施设置 _豁免(Exemptions)_ 规则, +你可以为 Pod 安全性的实施设置 **豁免(Exemptions)** 规则, 从而允许创建一些本来会被与给定名字空间相关的策略所禁止的 Pod。 豁免规则可以在[准入控制器配置](/zh-cn/docs/tasks/configure-pod-container/enforce-standards-admission-controller/#configure-the-admission-controller) 中静态配置。 @@ -257,7 +254,7 @@ Exemptions can be statically configured in the Exemptions must be explicitly enumerated. Requests meeting exemption criteria are _ignored_ by the Admission Controller (all `enforce`, `audit` and `warn` behaviors are skipped). Exemption dimensions include: --> -豁免规则可以显式枚举。满足豁免标准的请求会被准入控制器 _忽略_ +豁免规则可以显式枚举。满足豁免标准的请求会被准入控制器 **忽略** (所有 `enforce`、`audit` 和 `warn` 行为都会被略过)。 豁免的维度包括: @@ -306,7 +303,7 @@ current policy level: - Valid updates to `.spec.activeDeadlineSeconds` - Valid updates to `.spec.tolerations` --> -- 除了对 seccomp 或 AppArmor 注解之外的所有 meatadata 更新操作: +- 除了对 seccomp 或 AppArmor 注解之外的所有元数据(Metadata)更新操作: - `seccomp.security.alpha.kubernetes.io/pod` (已弃用) - `container.seccomp.security.alpha.kubernetes.io/*` (已弃用) - `container.apparmor.security.beta.kubernetes.io/*`