Skip to content

Commit 194c3a3

Browse files
committed
[zh] Sync access-authn-authz/admission-controllers.md
1 parent 6fe86b2 commit 194c3a3

File tree

2 files changed

+13
-87
lines changed

2 files changed

+13
-87
lines changed

content/zh-cn/docs/reference/access-authn-authz/admission-controllers.md

Lines changed: 4 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 准入控制器参考
33
linkTitle: 准入控制器
44
content_type: concept
5-
weight: 30
5+
weight: 40
66
---
77
<!--
88
reviewers:
@@ -15,14 +15,14 @@ reviewers:
1515
title: Admission Controllers Reference
1616
linkTitle: Admission Controllers
1717
content_type: concept
18-
weight: 30
18+
weight: 40
1919
-->
2020

2121
<!-- overview -->
2222
<!--
2323
This page provides an overview of Admission Controllers.
2424
-->
25-
此页面提供准入控制器(Admission Controllers)的概述。
25+
此页面提供准入控制器(Admission Controller)的概述。
2626

2727
<!-- body -->
2828

@@ -69,7 +69,7 @@ Kubernetes {{< skew currentVersion >}}
6969
并编译进 `kube-apiserver` 可执行文件,并且只能由集群管理员配置。
7070
在该列表中,有两个特殊的控制器:MutatingAdmissionWebhook 和 ValidatingAdmissionWebhook。
7171
它们根据 API 中的配置,
72-
分别执行变更和验证[准入控制 webhook](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks)
72+
分别执行变更和验证[准入控制 Webhook](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks)
7373

7474
<!--
7575
## Admission control phases
@@ -1401,80 +1401,6 @@ for more information.
14011401

14021402
详情请参见 [Pod 开销](/zh-cn/docs/concepts/scheduling-eviction/pod-overhead/)。
14031403

1404-
### SecurityContextDeny {#securitycontextdeny}
1405-
1406-
<!--
1407-
**Type**: Validating.
1408-
-->
1409-
**类别**:验证。
1410-
1411-
{{< feature-state for_k8s_version="v1.27" state="deprecated" >}}
1412-
1413-
{{< caution >}}
1414-
<!--
1415-
The Kubernetes project recommends that you **do not use** the
1416-
`SecurityContextDeny` admission controller.
1417-
1418-
The `SecurityContextDeny` admission controller plugin is deprecated and disabled
1419-
by default. It will be removed in a future version. If you choose to enable the
1420-
`SecurityContextDeny` admission controller plugin, you must enable the
1421-
`SecurityContextDeny` feature gate as well.
1422-
-->
1423-
Kubernetes 项目建议你**不要使用** `SecurityContextDeny` 准入控制器。
1424-
1425-
`SecurityContextDeny` 准入控制器插件已被弃用,并且默认处于禁用状态。
1426-
此插件将在后续的版本中被移除。如果你选择启用 `SecurityContextDeny` 准入控制器插件,
1427-
也必须同时启用 `SecurityContextDeny` 特性门控。
1428-
1429-
<!--
1430-
The `SecurityContextDeny` admission plugin is deprecated because it is outdated
1431-
and incomplete; it may be unusable or not do what you would expect. As
1432-
implemented, this plugin is unable to restrict all security-sensitive attributes
1433-
of the Pod API. For example, the `privileged` and `ephemeralContainers` fields
1434-
were never restricted by this plugin.
1435-
-->
1436-
`SecurityContextDeny` 准入插件已被弃用,因为它已经过时且不完整;
1437-
它可能无法使用或无法达到你的预期。该插件实现之时,就无法限制 Pod API 的所有与安全相关的属性。
1438-
例如,`privileged` 和 `ephemeralContainers` 字段就从未受过此插件的限制。
1439-
1440-
<!--
1441-
The [Pod Security Admission](/docs/concepts/security/pod-security-admission/)
1442-
plugin enforcing the [Pod Security Standards](/docs/concepts/security/pod-security-standards/)
1443-
`Restricted` profile captures what this plugin was trying to achieve in a better
1444-
and up-to-date way.
1445-
-->
1446-
采用 [Pod 安全性标准](/zh-cn/docs/concepts/security/pod-security-standards/)中的 `Restricted`
1447-
方案的 [Pod 安全性准入](/zh-cn/docs/concepts/security/pod-security-admission/)插件,
1448-
能以更好和最新的方式来表述此插件所要实现的目标。
1449-
{{< /caution >}}
1450-
1451-
<!--
1452-
This admission controller will deny any Pod that attempts to set the following
1453-
[SecurityContext](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)
1454-
fields:
1455-
-->
1456-
此准入控制器将拒绝任何尝试设置以下
1457-
[SecurityContext](/zh-cn/docs/tasks/configure-pod-container/security-context/)
1458-
字段的 Pod:
1459-
1460-
- `.spec.securityContext.supplementalGroups`
1461-
- `.spec.securityContext.seLinuxOptions`
1462-
- `.spec.securityContext.runAsUser`
1463-
- `.spec.securityContext.fsGroup`
1464-
- `.spec.(init)Containers[*].securityContext.seLinuxOptions`
1465-
- `.spec.(init)Containers[*].securityContext.runAsUser`
1466-
1467-
<!--
1468-
For more historical context on this plugin, see
1469-
[The birth of PodSecurityPolicy](/blog/2022/08/23/podsecuritypolicy-the-historical-context/#the-birth-of-podsecuritypolicy)
1470-
from the Kubernetes blog article about PodSecurityPolicy and its removal. The
1471-
article details the PodSecurityPolicy historical context and the birth of the
1472-
`securityContext` field for Pods.
1473-
-->
1474-
有关此插件的更多历史背景,请参阅 Kubernetes 博客中这篇有关 PodSecurityPolicy 及其移除的文章:
1475-
[The birth of PodSecurityPolicy](/blog/2022/08/23/podsecuritypolicy-the-historical-context/#the-birth-of-podsecuritypolicy)。
1476-
这篇文章详细地介绍了 PodSecurityPolicy 的历史背景以及 Pod 的 `securityContext` 字段的诞生。
1477-
14781404
### ServiceAccount {#serviceaccount}
14791405

14801406
<!--

content/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 动态准入控制
33
content_type: concept
4-
weight: 40
4+
weight: 45
55
---
66
<!--
77
reviewers:
@@ -13,7 +13,7 @@ reviewers:
1313
- jpbetz
1414
title: Dynamic Admission Control
1515
content_type: concept
16-
weight: 40
16+
weight: 45
1717
-->
1818

1919
<!-- overview -->
@@ -93,8 +93,8 @@ In the following, we describe how to quickly experiment with admission webhooks.
9393
### 先决条件 {#prerequisites}
9494

9595
* 确保启用 MutatingAdmissionWebhook 和 ValidatingAdmissionWebhook 控制器。
96-
[这里](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#is-there-a-recommended-set-of-admission-controllers-to-use)
97-
是一组推荐的 admission 控制器,通常可以启用。
96+
[这里](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#is-there-a-recommended-set-of-admission-controllers-to-use)是一组推荐的准入控制器,
97+
通常可以启用。
9898

9999
* 确保启用了 `admissionregistration.k8s.io/v1` API。
100100

@@ -110,8 +110,8 @@ that is validated in a Kubernetes e2e test. The webhook handles the
110110
as an `AdmissionReview` object in the same version it received.
111111
-->
112112
请参阅 Kubernetes e2e 测试中的
113-
[Admission Webhook 服务器](https://github.com/kubernetes/kubernetes/blob/release-1.21/test/images/agnhost/webhook/main.go)
114-
的实现。Webhook 处理由 API 服务器发送的 `AdmissionReview` 请求,并且将其决定作为
113+
[Admission Webhook 服务器](https://github.com/kubernetes/kubernetes/blob/release-1.21/test/images/agnhost/webhook/main.go)的实现。
114+
Webhook 处理由 API 服务器发送的 `AdmissionReview` 请求,并且将其决定作为
115115
`AdmissionReview` 对象以相同版本发送回去。
116116

117117
<!--
@@ -284,8 +284,8 @@ Webhook 提供身份证明。完成此配置需要三个步骤。
284284
* 启动 API 服务器时,通过 `--admission-control-config-file` 参数指定准入控制配置文件的位置。
285285

286286
* 在准入控制配置文件中,指定 MutatingAdmissionWebhook 控制器和 ValidatingAdmissionWebhook 控制器应该读取凭据的位置。
287-
凭证存储在 kubeConfig 文件中(是​​的,与 kubectl 使用的模式相同),因此字段名称为 `kubeConfigFile`。
288-
以下是一个准入控制配置文件示例:
287+
凭证存储在 kubeConfig 文件中(是​​的,与 kubectl 使用的模式相同),因此字段名称为 `kubeConfigFile`。
288+
以下是一个准入控制配置文件示例:
289289

290290
{{< tabs name="admissionconfiguration_example1" >}}
291291
{{% tab name="apiserver.config.k8s.io/v1" %}}
@@ -1161,7 +1161,7 @@ The `matchPolicy` for an admission webhooks defaults to `Equivalent`.
11611161
-->
11621162
### 匹配请求:`matchConditions` {#matching-requests-matchConditions}
11631163

1164-
{{< feature-state state="beta" for_k8s_version="v1.28" >}}
1164+
{{< feature-state feature_gate_name="AdmissionWebhookMatchConditions" >}}
11651165

11661166
<!--
11671167
You can define _match conditions_ for webhooks if you need fine-grained request filtering. These

0 commit comments

Comments
 (0)