Skip to content

Commit 7f198cd

Browse files
authored
Merge pull request #29411 from tengqm/zh-fix-saadmin
[zh] Fix and resync service accounts admin page
2 parents 79bb314 + 3cebde5 commit 7f198cd

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

content/zh/docs/reference/access-authn-authz/service-accounts-admin.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ It acts synchronously to modify pods as they are created or updated. When this p
115115
1. 如果该 Pod 没有设置 `ServiceAccount`,将其 `ServiceAccount` 设为 `default`
116116
1. 保证 Pod 所引用的 `ServiceAccount` 确实存在,否则拒绝该 Pod。
117117
1. 如果服务账号的 `automountServiceAccountToken` 或 Pod 的
118-
`automountServiceAccountToken` 都未显示设置为 `false`,则为 Pod 创建一个
118+
`automountServiceAccountToken` 都未显式设置为 `false`,则为 Pod 创建一个
119119
`volume`,在其中包含用来访问 API 的令牌。
120120
1. 如果前一步中为服务账号令牌创建了卷,则为 Pod 中的每个容器添加一个
121121
`volumeSource`,挂载在其 `/var/run/secrets/kubernetes.io/serviceaccount`
@@ -128,16 +128,13 @@ It acts synchronously to modify pods as they are created or updated. When this p
128128
-->
129129
#### 绑定的服务账号令牌卷 {#bound-service-account-token-volume}
130130

131-
132-
{{< feature-state for_k8s_version="v1.21" state="beta" >}}
131+
{{< feature-state for_k8s_version="v1.22" state="stable" >}}
133132

134133
<!--
135-
When the `BoundServiceAccountTokenVolume` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is enabled, the service account admission controller will
136-
add the following projected volume instead of a Secret-based volume for the non-expiring service account token created by Token Controller.
134+
The ServiceAccount admission controller will add the following projected volume instead of a Secret-based volume for the non-expiring service account token created by Token Controller.
137135
-->
138136
`BoundServiceAccountTokenVolume`
139-
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
140-
被启用时,服务账号准入控制器将添加如下投射卷,而不是为令牌控制器
137+
ServiceAccount 准入控制器将添加如下投射卷,而不是为令牌控制器
141138
所生成的不过期的服务账号令牌而创建的基于 Secret 的卷。
142139

143140
```yaml
@@ -165,7 +162,7 @@ add the following projected volume instead of a Secret-based volume for the non-
165162
This projected volume consists of three sources:
166163
167164
1. A ServiceAccountToken acquired from kube-apiserver via TokenRequest API. It will expire after 1 hour by default or when the pod is deleted. It is bound to the pod and has kube-apiserver as the audience.
168-
1. A ConfigMap containing a CA bundle used for verifying connections to the kube-apiserver. This feature depends on the `RootCAConfigMap` feature gate being enabled, which publishes a "kube-root-ca.crt" ConfigMap to every namespace. `RootCAConfigMap` is enabled by default in 1.20, and always enabled in 1.21+.
165+
1. A ConfigMap containing a CA bundle used for verifying connections to the kube-apiserver. This feature depends on the `RootCAConfigMap` feature gate, which publishes a "kube-root-ca.crt" ConfigMap to every namespace. `RootCAConfigMap` feature gate is graduated to GA in 1.21 and default to true. (This feature will be removed from --feature-gate arg in 1.22).
169166
1. A DownwardAPI that references the namespace of the pod.
170167
-->
171168
此投射卷有三个数据源:
@@ -174,27 +171,18 @@ This projected volume consists of three sources:
174171
这一令牌默认会在一个小时之后或者 Pod 被删除时过期。
175172
该令牌绑定到 Pod 实例上,并将 kube-apiserver 作为其受众(audience)。
176173
1. 包含用来验证与 kube-apiserver 连接的 CA 证书包的 ConfigMap 对象。
177-
这一特性依赖于 `RootCAConfigMap` 特性门控被启用。该特性被启用时,
174+
这一特性依赖于 `RootCAConfigMap` 特性门控。该特性被启用时,
178175
控制面会公开一个名为 `kube-root-ca.crt` 的 ConfigMap 给所有名字空间。
179-
`RootCAConfigMap` 在 1.20 版本中是默认被启用的,在 1.21 及之后版本中
180-
总是被启用
176+
`RootCAConfigMap` 在 1.21 版本中进入 GA 状态,默认被启用,
177+
该特性门控会在 1.22 版本中从 `--feature-gate` 参数中删除
181178
1. 引用 Pod 名字空间的一个 DownwardAPI。
182179

183180
<!--
184181
See more details about [projected volumes](/docs/tasks/configure-pod-container/configure-projected-volume-storage/).
185-
186-
You can manually migrate a secret-based service account volume to a projected volume when
187-
the `BoundServiceAccountTokenVolume` feature gate is not enabled by adding the above
188-
projected volume to the pod spec. However, `RootCAConfigMap` needs to be enabled.
189182
-->
190183
参阅[投射卷](/zh/docs/tasks/configure-pod-container/configure-projected-volume-storage/)
191184
了解进一步的细节。
192185

193-
如果 `BoundServiceAccountTokenVolume` 特性门控未被启用,
194-
你可以手动地将一个基于 Secret 的服务账号卷升级为一个投射卷,
195-
方法是将上述投射卷添加到 Pod 规约中。
196-
不过,这时仍需要启用 `RootCAConfigMap` 特性门控。
197-
198186
<!--
199187
### Token Controller
200188

0 commit comments

Comments
 (0)