Skip to content

Commit 36be4cb

Browse files
committed
[zh] translate zh/docs/reference/config-api/client-authentication.v1beta1
1 parent 3920b5e commit 36be4cb

File tree

2 files changed

+124
-37
lines changed

2 files changed

+124
-37
lines changed

content/zh/docs/reference/config-api/client-authentication.v1.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ of CertificateAuthority, since CA data will always be passed to the plugin as by
7676
Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证时所需
7777
的信息。
7878

79+
为了确保该结构体包含需要与 Kubernetes 集群进行通信的所有内容(就像通过 Kubeconfig 一样),
80+
除了证书授权之外,该字段应该映射到 "k8s.io/client-go/tools/clientcmd/api/v1".cluster,
81+
由于 CA 数据将始终以字节形式传递给插件。
82+
7983
<table class="table">
8084
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
8185
<tbody>
@@ -167,7 +171,7 @@ clusters:
167171
只是针对不同集群会有一些细节上的差异,例如 audience。
168172
此字段使得特定于集群的配置可以直接使用集群信息来设置。
169173
不建议使用此字段来保存 Secret 数据,因为 exec 插件的主要优势之一是不需要在
170-
kubeconfig 中保存 Secret 数据。
174+
kubeconfig 中保存 Secret 数据。</p>
171175
</td>
172176
</tr>
173177
</tbody>
@@ -222,6 +226,7 @@ ExecCredentialSpec 保存传输组件所提供的特定于请求和运行时的
222226
<!--
223227
**Appears in:**
224228
-->
229+
**出现在:**
225230

226231
- [ExecCredential](#client-authentication-k8s-io-v1-ExecCredential)
227232

@@ -235,7 +240,7 @@ itself should at least be protected via file permissions.
235240
<p>ExecCredentialStatus 中包含传输组件要使用的凭据。</p>
236241
<p>字段 token 和 clientKeyData 都是敏感字段。此数据只能在
237242
客户端与 exec 插件进程之间使用内存来传递。exec 插件本身至少
238-
应通过文件访问许可来实施保护。</p>
243+
应通过文件访问许可来实施保护。</p>
239244

240245
<table class="table">
241246
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>

content/zh/docs/reference/config-api/client-authentication.v1beta1.md

Lines changed: 117 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
---
2-
title: Client Authentication (v1beta1)
2+
title: 客户端身份认证(Client Authentication(v1beta1)
33
content_type: tool-reference
44
package: client.authentication.k8s.io/v1beta1
55
auto_generated: true
66
---
77

8+
<!--
9+
title: Client Authentication (v1beta1)
10+
content_type: tool-reference
11+
package: client.authentication.k8s.io/v1beta1
12+
auto_generated: true
13+
-->
14+
815

16+
<!--
917
## Resource Types
18+
-->
19+
## 资源类型 {#resource-types}
1020

1121

1222
- [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential)
@@ -20,11 +30,14 @@ auto_generated: true
2030

2131

2232

33+
<!--
2334
ExecCredential is used by exec-based plugins to communicate credentials to
2435
HTTP transports.
36+
-->
37+
ExecCredential 由基于 exec 的插件使用,与 HTTP 传输组件沟通凭据信息。
2538

2639
<table class="table">
27-
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
40+
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
2841
<tbody>
2942

3043
<tr><td><code>apiVersion</code><br/>string</td><td><code>client.authentication.k8s.io/v1beta1</code></td></tr>
@@ -33,20 +46,24 @@ HTTP transports.
3346

3447

3548

36-
<tr><td><code>spec</code> <B>[Required]</B><br/>
49+
<tr><td><code>spec</code> <B><!--[Required]-->[必需]</B><br/>
3750
<a href="#client-authentication-k8s-io-v1beta1-ExecCredentialSpec"><code>ExecCredentialSpec</code></a>
3851
</td>
3952
<td>
40-
Spec holds information passed to the plugin by the transport.</td>
53+
<!--Spec holds information passed to the plugin by the transport.-->
54+
字段 spec 包含由 HTTP 传输组件传递给插件的信息。
55+
</td>
4156
</tr>
4257

4358

4459
<tr><td><code>status</code><br/>
4560
<a href="#client-authentication-k8s-io-v1beta1-ExecCredentialStatus"><code>ExecCredentialStatus</code></a>
4661
</td>
4762
<td>
48-
Status is filled in by the plugin and holds the credentials that the transport
49-
should use to contact the API.</td>
63+
<!--Status is filled in by the plugin and holds the credentials that the transport
64+
should use to contact the API.-->
65+
字段 status 由插件填充,包含传输组件与 API 服务器连接时需要提供的凭据。
66+
</td>
5067
</tr>
5168

5269

@@ -60,95 +77,135 @@ should use to contact the API.</td>
6077

6178

6279

63-
**Appears in:**
80+
<!--**Appears in:**-->
81+
**出现在:**
6482

6583
- [ExecCredentialSpec](#client-authentication-k8s-io-v1beta1-ExecCredentialSpec)
6684

6785

86+
<!--
6887
Cluster contains information to allow an exec plugin to communicate
6988
with the kubernetes cluster being authenticated to.
7089
7190
To ensure that this struct contains everything someone would need to communicate
7291
with a kubernetes cluster (just like they would via a kubeconfig), the fields
7392
should shadow "k8s.io/client-go/tools/clientcmd/api/v1".Cluster, with the exception
7493
of CertificateAuthority, since CA data will always be passed to the plugin as bytes.
94+
-->
95+
Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证时所需
96+
的信息。
97+
98+
为了确保该结构体包含需要与 Kubernetes 集群进行通信的所有内容(就像通过 Kubeconfig 一样),
99+
该字段应该映射到 "k8s.io/client-go/tools/clientcmd/api/v1".cluster,
100+
除了证书授权之外,由于 CA 数据将始终以字节形式传递给插件。
75101

76102
<table class="table">
77-
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
103+
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
78104
<tbody>
79105

80106

81107

82-
<tr><td><code>server</code> <B>[Required]</B><br/>
108+
<tr><td><code>server</code> <B><!--[Required]-->[必需]</B><br/>
83109
<code>string</code>
84110
</td>
85111
<td>
86-
Server is the address of the kubernetes cluster (https://hostname:port).</td>
112+
<!--Server is the address of the kubernetes cluster (https://hostname:port).-->
113+
字段 server 是 Kubernetes 集群的地址(https://hostname:port)。
114+
</td>
87115
</tr>
88116

89117

90118
<tr><td><code>tls-server-name</code><br/>
91119
<code>string</code>
92120
</td>
93121
<td>
122+
<!--
94123
TLSServerName is passed to the server for SNI and is used in the client to
95124
check server certificates against. If ServerName is empty, the hostname
96-
used to contact the server is used.</td>
125+
used to contact the server is used.
126+
-->
127+
tls-server-name 是用来提供给服务器用作 SNI 解析的,客户端以此检查服务器的证书。
128+
如此字段为空,则使用链接服务器时使用的主机名。
129+
</td>
97130
</tr>
98131

99132

100133
<tr><td><code>insecure-skip-tls-verify</code><br/>
101134
<code>bool</code>
102135
</td>
103136
<td>
137+
<!--
104138
InsecureSkipTLSVerify skips the validity check for the server's certificate.
105-
This will make your HTTPS connections insecure.</td>
139+
This will make your HTTPS connections insecure.
140+
-->
141+
设置此字段之后,会令客户端跳过对服务器端证书的合法性检查。
142+
这会使得你的 HTTPS 链接不再安全。
143+
</td>
106144
</tr>
107145

108146

109147
<tr><td><code>certificate-authority-data</code><br/>
110148
<code>[]byte</code>
111149
</td>
112150
<td>
151+
<!--
113152
CAData contains PEM-encoded certificate authority certificates.
114-
If empty, system roots should be used.</td>
153+
If empty, system roots should be used.
154+
-->
155+
此字段包含 PEM 编码的证书机构(CA)证书。
156+
如果为空,则使用系统的根证书。
157+
</td>
115158
</tr>
116159

117160

118161
<tr><td><code>proxy-url</code><br/>
119162
<code>string</code>
120163
</td>
121164
<td>
122-
ProxyURL is the URL to the proxy to be used for all requests to this
123-
cluster.</td>
165+
<!--ProxyURL is the URL to the proxy to be used for all requests to this cluster.-->
166+
此字段用来设置向集群发送所有请求时要使用的代理服务器。
167+
</td>
124168
</tr>
125169

126170

127171
<tr><td><code>config</code><br/>
128172
<a href="https://godoc.org/k8s.io/apimachinery/pkg/runtime/#RawExtension"><code>k8s.io/apimachinery/pkg/runtime.RawExtension</code></a>
129173
</td>
130174
<td>
175+
<!--
131176
Config holds additional config data that is specific to the exec
132177
plugin with regards to the cluster being authenticated to.
133178
134179
This data is sourced from the clientcmd Cluster object's
135-
extensions[client.authentication.k8s.io/exec] field:
136-
180+
extensions[client.authentication.k8s.io/exec] field:
181+
-->
182+
<p>此字段包含一些额外的、特定于 exec 插件和所连接的集群的数据,</p>
183+
<p>此字段来自于 clientcmd 集群对象的 <code>extensions[client.authentication.k8s.io/exec]</code>
184+
字段:</p>
185+
<pre>
137186
clusters:
138187
- name: my-cluster
139188
cluster:
140189
...
141190
extensions:
142-
- name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config
191+
- name: client.authentication.k8s.io/exec # 针对每个集群 exec 配置所预留的扩展名称
143192
extension:
144-
audience: 06e3fbd18de8 # arbitrary config
145-
193+
audience: 06e3fbd18de8 # 任意配置信息
194+
</pre>
195+
<!--
146196
In some environments, the user config may be exactly the same across many clusters
147197
(i.e. call this exec plugin) minus some details that are specific to each cluster
148198
such as the audience. This field allows the per cluster config to be directly
149199
specified with the cluster info. Using this field to store secret data is not
150200
recommended as one of the prime benefits of exec plugins is that no secrets need
151-
to be stored directly in the kubeconfig.</td>
201+
to be stored directly in the kubeconfig.
202+
-->
203+
<p>在某些环境中,用户配置可能对很多集群而言都完全一样(即调用同一个 exec 插件),
204+
只是针对不同集群会有一些细节上的差异,例如 audience。
205+
此字段使得特定于集群的配置可以直接使用集群信息来设置。
206+
不建议使用此字段来保存 Secret 数据,因为 exec 插件的主要优势之一是不需要在
207+
kubeconfig 中保存 Secret 数据。</p>
208+
</td>
152209
</tr>
153210

154211

@@ -162,16 +219,20 @@ to be stored directly in the kubeconfig.</td>
162219

163220

164221

165-
**Appears in:**
222+
<!-- **Appears in:** -->
223+
**出现在:**
166224

167225
- [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential)
168226

169227

228+
<!--
170229
ExecCredentialSpec holds request and runtime specific information provided by
171-
the transport.
230+
the transport.
231+
-->
232+
ExecCredentialSpec 保存传输组件所提供的特定于请求和运行时的信息。
172233

173234
<table class="table">
174-
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
235+
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
175236
<tbody>
176237

177238

@@ -180,10 +241,16 @@ the transport.
180241
<a href="#client-authentication-k8s-io-v1beta1-Cluster"><code>Cluster</code></a>
181242
</td>
182243
<td>
244+
<!--
183245
Cluster contains information to allow an exec plugin to communicate with the
184246
kubernetes cluster being authenticated to. Note that Cluster is non-nil only
185247
when provideClusterInfo is set to true in the exec provider config (i.e.,
186-
ExecConfig.ProvideClusterInfo).</td>
248+
ExecConfig.ProvideClusterInfo).
249+
-->
250+
此字段中包含的信息使得 exec 插件能够与要访问的 Kubernetes 集群通信。
251+
注意,cluster 字段只有在 exec 驱动的配置中 provideClusterInfo
252+
(即:ExecConfig.ProvideClusterInfo)被设置为 true 时才不能为空。
253+
</td>
187254
</tr>
188255

189256

@@ -197,52 +264,67 @@ ExecConfig.ProvideClusterInfo).</td>
197264

198265

199266

200-
**Appears in:**
267+
<!-- **Appears in:** -->
268+
**出现在:**
201269

202270
- [ExecCredential](#client-authentication-k8s-io-v1beta1-ExecCredential)
203271

204272

273+
<!--
205274
ExecCredentialStatus holds credentials for the transport to use.
206275
207276
Token and ClientKeyData are sensitive fields. This data should only be
208277
transmitted in-memory between client and exec plugin process. Exec plugin
209278
itself should at least be protected via file permissions.
279+
-->
280+
<p>ExecCredentialStatus 中包含传输组件要使用的凭据。</p>
281+
282+
<p>字段 token 和 clientKeyData 都是敏感字段。
283+
此数据只能在客户端与 exec 插件进程之间使用内存来传递。
284+
exec 插件本身至少应通过文件访问许可来实施保护。</p>
210285

211286
<table class="table">
212-
<thead><tr><th width="30%">Field</th><th>Description</th></tr></thead>
213-
<tbody>
287+
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
214288

215289

216290

217291
<tr><td><code>expirationTimestamp</code><br/>
218292
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#time-v1-meta"><code>meta/v1.Time</code></a>
219293
</td>
220294
<td>
221-
ExpirationTimestamp indicates a time when the provided credentials expire.</td>
295+
<!-- ExpirationTimestamp indicates a time when the provided credentials expire. -->
296+
给出所提供的凭据到期的时间。
297+
</td>
222298
</tr>
223299

224300

225-
<tr><td><code>token</code> <B>[Required]</B><br/>
301+
<tr><td><code>token</code> <B><!--[Required]-->[必需]</B><br/>
226302
<code>string</code>
227303
</td>
228304
<td>
229-
Token is a bearer token used by the client for request authentication.</td>
305+
<!-- Token is a bearer token used by the client for request authentication. -->
306+
客户端用做请求身份认证的持有者令牌。
307+
</td>
230308
</tr>
231309

232310

233-
<tr><td><code>clientCertificateData</code> <B>[Required]</B><br/>
311+
<tr><td><code>clientCertificateData</code> <B><!--[Required]-->[必需]</B><br/>
234312
<code>string</code>
235313
</td>
236314
<td>
237-
PEM-encoded client TLS certificates (including intermediates, if any).</td>
315+
<!-- PEM-encoded client TLS certificates (including intermediates, if any). -->
316+
PEM 编码的客户端 TLS 证书(如果有临时证书,也会包含)。
317+
</td>
238318
</tr>
239319

240320

241-
<tr><td><code>clientKeyData</code> <B>[Required]</B><br/>
321+
<tr><td><code>clientKeyData</code> <B><!--[Required]-->[必需]</B><br/>
242322
<code>string</code>
243323
</td>
244324
<td>
245-
PEM-encoded private key for the above certificate.</td>
325+
<!-- PEM-encoded private key for the above certificate. -->
326+
与上述证书对应的、PEM 编码的私钥。
327+
</td>
246328
</tr>
247329

248330

0 commit comments

Comments
 (0)