Skip to content

Commit 109d945

Browse files
authored
Merge pull request #34554 from tengqm/zh-resync-psa
[zh-cn] Resync Pod security admission page
2 parents 136902b + f19fc35 commit 109d945

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

content/zh-cn/docs/concepts/security/pod-security-admission.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,29 +56,27 @@ PodSecurityPolicy API 已经被废弃,会在 Kubernetes v1.25 发行版中
5656

5757
<!-- body -->
5858

59-
<!--
6059
## {{% heading "prerequisites" %}}
6160

61+
<!--
6262
To use this mechanism, your cluster must enforce Pod Security admission.
63-
64-
### Built-in Pod Security admission enforcement
6563
-->
66-
## {{% heading "prerequisites" %}}
67-
6864
要使用此机制,你的集群必须强制执行 Pod 安全准入。
6965

70-
### 内置 Pod 安全准入强制执行
71-
7266
<!--
73-
In Kubernetes v{{< skew currentVersion >}}, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
74-
is a beta feature and is enabled by default. You must have this feature gate enabled.
67+
### Built-in Pod Security admission enforcement
68+
69+
In Kubernetes v1.23, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is a beta feature and is enabled by default.
70+
This page is part of the documentation for Kubernetes v{{< skew currentVersion >}}.
7571
If you are running a different version of Kubernetes, consult the documentation for that release.
7672
-->
77-
在 Kubernetes v{{< skew currentVersion >}} 中,`PodSecurity`
78-
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)是一项 Beta 特性,
79-
默认被启用。你必须启用此功能门控。如果你运行的是不同版本的 Kubernetes,请查阅该版本的文档。
80-
73+
### 内置 Pod 安全准入强制执行
8174

75+
在 Kubernetes v1.23 中,`PodSecurity`
76+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)是一项 Beta 特性,
77+
默认被启用。
78+
本页面是 Kubernetes v{{< skew currentVersion >}} 文档的一部分。
79+
如果你运行的是其它版本的 Kubernetes,请查阅该版本的文档。
8280

8381
<!--
8482
### Alternative: installing the `PodSecurity` admission webhook {#webhook}
@@ -100,6 +98,7 @@ To install:
10098
-->
10199
[https://git.k8s.io/pod-security-admission/webhook](https://git.k8s.io/pod-security-admission/webhook)
102100
上可以找到一个预先构建的容器镜像、证书生成脚本以及一些示例性质的清单。
101+
执行下面的命令来安装:
103102

104103
```shell
105104
git clone [email protected]:kubernetes/pod-security-admission.git
@@ -158,13 +157,11 @@ Kubernetes 定义了一组{{< glossary_tooltip term_id="label" text="标签" >}}
158157
要采取什么样的动作。
159158

160159
<!--
161-
{{< table caption="Pod Security Admission modes" >}}
162160
Mode | Description
163161
:---------|:------------
164162
**enforce** | Policy violations will cause the pod to be rejected.
165163
**audit** | Policy violations will trigger the addition of an audit annotation to the event recorded in the [audit log](/docs/tasks/debug/debug-cluster/audit/), but are otherwise allowed.
166164
**warn** | Policy violations will trigger a user-facing warning, but are otherwise allowed.
167-
{{< /table >}}
168165
-->
169166
{{< table caption="Pod 安全准入模式" >}}
170167
模式 | 描述
@@ -198,7 +195,7 @@ pod-security.kubernetes.io/<MODE>: <LEVEL>
198195
pod-security.kubernetes.io/<MODE>-version: <VERSION>
199196
-->
200197
```
201-
# 针对模式的级别标签用来标示针对该模式所应用的策略级别
198+
# 模式的级别标签用来标示对应模式所应用的策略级别
202199
#
203200
# MODE 必须是 `enforce`、`audit` 或 `warn` 之一
204201
# LEVEL 必须是 `privileged`、baseline` 或 `restricted` 之一
@@ -215,8 +212,7 @@ pod-security.kubernetes.io/<MODE>-version: <VERSION>
215212
<!--
216213
Check out [Enforce Pod Security Standards with Namespace Labels](/docs/tasks/configure-pod-container/enforce-standards-namespace-labels) to see example usage.
217214
-->
218-
关于用法示例,可参阅
219-
[使用名字空间标签来强制实施 Pod 安全标准](/zh-cn/docs/tasks/configure-pod-container/enforce-standards-namespace-labels/)
215+
关于用法示例,可参阅[使用名字空间标签来强制实施 Pod 安全标准](/zh-cn/docs/tasks/configure-pod-container/enforce-standards-namespace-labels/)
220216

221217
<!--
222218
## Workload resources and Pod templates
@@ -232,9 +228,10 @@ applied to workload resources, only to the resulting pod objects.
232228
## 负载资源和 Pod 模板 {#workload-resources-and-pod-templates}
233229

234230
Pod 通常是通过创建 {{< glossary_tooltip term_id="deployment" >}} 或
235-
{{< glossary_tooltip term_id="job">}} 这类[工作负载对象](/zh-cn/docs/concepts/workloads/controllers/)
236-
来间接创建的。工作负载对象为工作负载资源定义一个 _Pod 模板_ 和一个对应的
237-
负责基于该模板来创建 Pod 的{{< glossary_tooltip term_id="controller" text="控制器" >}}。
231+
{{< glossary_tooltip term_id="job">}}
232+
这类[工作负载对象](/zh-cn/docs/concepts/workloads/controllers/)
233+
来间接创建的。工作负载对象为工作负载资源定义一个 **Pod 模板**
234+
和一个对应的负责基于该模板来创建 Pod 的{{< glossary_tooltip term_id="controller" text="控制器" >}}。
238235
为了尽早地捕获违例状况,`audit``warn` 模式都应用到负载资源。
239236
不过,`enforce` 模式并 **** 应用到工作负载资源,仅应用到所生成的 Pod 对象上。
240237

@@ -248,7 +245,7 @@ Exemptions can be statically configured in the
248245
-->
249246
## 豁免 {#exemptions}
250247

251-
你可以为 Pod 安全性的实施设置 _豁免(Exemptions)_ 规则,
248+
你可以为 Pod 安全性的实施设置 **豁免(Exemptions)** 规则,
252249
从而允许创建一些本来会被与给定名字空间相关的策略所禁止的 Pod。
253250
豁免规则可以在[准入控制器配置](/zh-cn/docs/tasks/configure-pod-container/enforce-standards-admission-controller/#configure-the-admission-controller)
254251
中静态配置。
@@ -257,7 +254,7 @@ Exemptions can be statically configured in the
257254
Exemptions must be explicitly enumerated. Requests meeting exemption criteria are _ignored_ by the
258255
Admission Controller (all `enforce`, `audit` and `warn` behaviors are skipped). Exemption dimensions include:
259256
-->
260-
豁免规则可以显式枚举。满足豁免标准的请求会被准入控制器 _忽略_
257+
豁免规则可以显式枚举。满足豁免标准的请求会被准入控制器 **忽略**
261258
(所有 `enforce``audit``warn` 行为都会被略过)。
262259
豁免的维度包括:
263260

@@ -306,7 +303,7 @@ current policy level:
306303
- Valid updates to `.spec.activeDeadlineSeconds`
307304
- Valid updates to `.spec.tolerations`
308305
-->
309-
- 除了对 seccomp 或 AppArmor 注解之外的所有 meatadata 更新操作:
306+
- 除了对 seccomp 或 AppArmor 注解之外的所有元数据(Metadata)更新操作:
310307
- `seccomp.security.alpha.kubernetes.io/pod` (已弃用)
311308
- `container.seccomp.security.alpha.kubernetes.io/*` (已弃用)
312309
- `container.apparmor.security.beta.kubernetes.io/*`

0 commit comments

Comments
 (0)