@@ -36,7 +36,9 @@ ExecCredential 由基于 exec 的插件使用,与 HTTP 传输组件沟通凭
36
36
<a href =" #client-authentication-k8s-io-v1-ExecCredentialSpec " ><code >ExecCredentialSpec</code ></a >
37
37
</td >
38
38
<td >
39
- <!-- Spec holds information passed to the plugin by the transport.-->
39
+ <!--
40
+ Spec holds information passed to the plugin by the transport.
41
+ -->
40
42
字段 spec 包含由 HTTP 传输组件传递给插件的信息。
41
43
</td >
42
44
</tr >
@@ -45,8 +47,10 @@ ExecCredential 由基于 exec 的插件使用,与 HTTP 传输组件沟通凭
45
47
<a href =" #client-authentication-k8s-io-v1-ExecCredentialStatus " ><code >ExecCredentialStatus</code ></a >
46
48
</td >
47
49
<td >
48
- <!-- Status is filled in by the plugin and holds the credentials that the transport
49
- should use to contact the API.-->
50
+ <!--
51
+ Status is filled in by the plugin and holds the credentials that the transport
52
+ should use to contact the API.
53
+ -->
50
54
字段 status 由插件填充,包含传输组件与 API 服务器连接时需要提供的凭据。
51
55
</td >
52
56
</tr >
@@ -86,7 +90,9 @@ Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证
86
90
<code >string</code >
87
91
</td >
88
92
<td >
89
- <!-- Server is the address of the kubernetes cluster (https://hostname:port).-->
93
+ <!--
94
+ Server is the address of the kubernetes cluster (https://hostname:port).
95
+ -->
90
96
字段 server 是 Kubernetes 集群的地址(https://hostname:port)。
91
97
</td >
92
98
</tr >
@@ -95,9 +101,11 @@ Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证
95
101
<code >string</code >
96
102
</td >
97
103
<td >
98
- <!-- TLSServerName is passed to the server for SNI and is used in the client to
104
+ <!--
105
+ TLSServerName is passed to the server for SNI and is used in the client to
99
106
check server certificates against. If ServerName is empty, the hostname
100
- used to contact the server is used.-->
107
+ used to contact the server is used.
108
+ -->
101
109
tls-server-name 是用来提供给服务器用作 SNI 解析的,客户端以此检查服务器的证书。
102
110
如此字段为空,则使用链接服务器时使用的主机名。
103
111
</td >
@@ -107,8 +115,10 @@ Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证
107
115
<code >bool</code >
108
116
</td >
109
117
<td >
110
- <!-- InsecureSkipTLSVerify skips the validity check for the server's certificate.
111
- This will make your HTTPS connections insecure.-->
118
+ <!--
119
+ InsecureSkipTLSVerify skips the validity check for the server's certificate.
120
+ This will make your HTTPS connections insecure.
121
+ -->
112
122
设置此字段之后,会令客户端跳过对服务器端证书的合法性检查。
113
123
这会使得你的 HTTPS 链接不再安全。
114
124
</td >
@@ -118,8 +128,10 @@ Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证
118
128
<code >[ ] byte</code >
119
129
</td >
120
130
<td >
121
- <!-- CAData contains PEM-encoded certificate authority certificates.
122
- If empty, system roots should be used.-->
131
+ <!--
132
+ CAData contains PEM-encoded certificate authority certificates.
133
+ If empty, system roots should be used.
134
+ -->
123
135
此字段包含 PEM 编码的证书机构(CA)证书。
124
136
如果为空,则使用系统的根证书。
125
137
</td >
@@ -129,8 +141,10 @@ Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证
129
141
<code >string</code >
130
142
</td >
131
143
<td >
132
- <!-- ProxyURL is the URL to the proxy to be used for all requests to this
133
- cluster.-->
144
+ <!--
145
+ ProxyURL is the URL to the proxy to be used for all requests to this
146
+ cluster.
147
+ -->
134
148
此字段用来设置向集群发送所有请求时要使用的代理服务器。
135
149
</td >
136
150
</tr >
@@ -139,31 +153,47 @@ Cluster 中包含允许 exec 插件与 Kubernetes 集群进行通信身份认证
139
153
<code >bool</code >
140
154
</td >
141
155
<td >
156
+ <p >
142
157
<!--
143
158
DisableCompression allows client to opt-out of response compression for all requests to the server. This is useful
144
159
to speed up requests (specifically lists) when client-server network bandwidth is ample, by saving time on
145
160
compression (server-side) and decompression (client-side): https://github.com/kubernetes/kubernetes/issues/112296.
146
161
-->
147
- < p > disable-compression 允许客户端针对到服务器的所有请求选择取消响应压缩。
162
+ disable-compression 允许客户端针对到服务器的所有请求选择取消响应压缩。
148
163
当客户端服务器网络带宽充足时,这有助于通过节省压缩(服务器端)和解压缩(客户端)时间来加快请求(特别是列表)的速度:
149
- https://github.com/kubernetes/kubernetes/issues/112296。 </p >
164
+ https://github.com/kubernetes/kubernetes/issues/112296。
165
+ </p >
150
166
</td >
151
167
</tr >
152
168
153
169
<tr ><td ><code >config</code ><br />
154
170
<a href =" https://godoc.org/k8s.io/apimachinery/pkg/runtime/#RawExtension " ><code >k8s.io/apimachinery/pkg/runtime.RawExtension</code ></a >
155
171
</td >
156
172
<td >
157
- <!-- Config holds additional config data that is specific to the exec
173
+ <p >
174
+ <!--
175
+ Config holds additional config data that is specific to the exec
158
176
plugin with regards to the cluster being authenticated to.
159
-
177
+ -->
178
+ </p >
179
+ 此字段包含一些额外的、特定于 exec 插件和所连接的集群的数据。
180
+ <p >
160
181
This data is sourced from the clientcmd Cluster object's
161
182
extensions[ client.authentication.k8s.io/exec] field:
162
- -->
163
- <p >此字段包含一些额外的、特定于 exec 插件和所连接的集群的数据,</p >
164
- <p >此字段来自于 clientcmd 集群对象的 <code >extensions[client.authentication.k8s.io/exec]</code >
165
- 字段:</p >
183
+ 此字段来自于 clientcmd 集群对象的 <code >extensions[ client.authentication.k8s.io/exec] </code >
184
+ 字段:
185
+ </p >
166
186
<pre >
187
+ <!--
188
+ clusters:
189
+ - name: my-cluster
190
+ cluster:
191
+ ...
192
+ extensions:
193
+ - name: client.authentication.k8s.io/exec # reserved extension name for per cluster exec config
194
+ extension:
195
+ audience: 06e3fbd18de8 # arbitrary config
196
+ -->
167
197
clusters:
168
198
- name: my-cluster
169
199
cluster:
@@ -174,17 +204,21 @@ clusters:
174
204
audience: 06e3fbd18de8 # 任意配置信息
175
205
</pre >
176
206
177
- <!-- In some environments, the user config may be exactly the same across many clusters
207
+ <p >
208
+ <!--
209
+ In some environments, the user config may be exactly the same across many clusters
178
210
(i.e. call this exec plugin) minus some details that are specific to each cluster
179
211
such as the audience. This field allows the per cluster config to be directly
180
212
specified with the cluster info. Using this field to store secret data is not
181
213
recommended as one of the prime benefits of exec plugins is that no secrets need
182
- to be stored directly in the kubeconfig.-->
183
- <p >在某些环境中,用户配置可能对很多集群而言都完全一样(即调用同一个 exec 插件),
214
+ to be stored directly in the kubeconfig.
215
+ -->
216
+ 在某些环境中,用户配置可能对很多集群而言都完全一样(即调用同一个 exec 插件),
184
217
只是针对不同集群会有一些细节上的差异,例如 audience。
185
218
此字段使得特定于集群的配置可以直接使用集群信息来设置。
186
219
不建议使用此字段来保存 Secret 数据,因为 exec 插件的主要优势之一是不需要在
187
- kubeconfig 中保存 Secret 数据。</p >
220
+ kubeconfig 中保存 Secret 数据。
221
+ </p >
188
222
</td >
189
223
</tr >
190
224
</tbody >
@@ -213,10 +247,12 @@ ExecCredentialSpec 保存传输组件所提供的特定于请求和运行时的
213
247
<a href =" #client-authentication-k8s-io-v1-Cluster " ><code >Cluster</code ></a >
214
248
</td >
215
249
<td >
216
- <!-- Cluster contains information to allow an exec plugin to communicate with the
250
+ <!--
251
+ Cluster contains information to allow an exec plugin to communicate with the
217
252
kubernetes cluster being authenticated to. Note that Cluster is non-nil only
218
253
when provideClusterInfo is set to true in the exec provider config (i.e.,
219
- ExecConfig.ProvideClusterInfo).-->
254
+ ExecConfig.ProvideClusterInfo).
255
+ -->
220
256
此字段中包含的信息使得 exec 插件能够与要访问的 Kubernetes 集群通信。
221
257
注意,cluster 字段只有在 exec 驱动的配置中 provideClusterInfo
222
258
(即:ExecConfig.ProvideClusterInfo)被设置为 true 时才不能为空。
@@ -227,7 +263,9 @@ ExecCredentialSpec 保存传输组件所提供的特定于请求和运行时的
227
263
<code >bool</code >
228
264
</td >
229
265
<td >
230
- <!-- Interactive declares whether stdin has been passed to this exec plugin.-->
266
+ <!--
267
+ Interactive declares whether stdin has been passed to this exec plugin.
268
+ -->
231
269
此字段用来标明标准输出信息是否已传递给 exec 插件。
232
270
</td >
233
271
</tr >
@@ -259,10 +297,12 @@ itself should at least be protected via file permissions.
259
297
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
260
298
<tbody >
261
299
<tr ><td ><code >expirationTimestamp</code ><br />
262
- <a href =" https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32 /#time-v1-meta " ><code >meta/v1.Time</code ></a >
300
+ <a href =" https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33 /#time-v1-meta " ><code >meta/v1.Time</code ></a >
263
301
</td >
264
302
<td >
265
- <!-- ExpirationTimestamp indicates a time when the provided credentials expire.-->
303
+ <!--
304
+ ExpirationTimestamp indicates a time when the provided credentials expire.
305
+ -->
266
306
给出所提供的凭据到期的时间。
267
307
</td >
268
308
</tr >
@@ -271,7 +311,9 @@ itself should at least be protected via file permissions.
271
311
<code >string</code >
272
312
</td >
273
313
<td >
274
- <!-- Token is a bearer token used by the client for request authentication.-->
314
+ <!--
315
+ Token is a bearer token used by the client for request authentication.
316
+ -->
275
317
客户端用做请求身份认证的持有者令牌。
276
318
</td >
277
319
</tr >
@@ -280,7 +322,9 @@ itself should at least be protected via file permissions.
280
322
<code >string</code >
281
323
</td >
282
324
<td >
283
- <!-- PEM-encoded client TLS certificates (including intermediates, if any).-->
325
+ <!--
326
+ PEM-encoded client TLS certificates (including intermediates, if any).
327
+ -->
284
328
PEM 编码的客户端 TLS 证书(如果有临时证书,也会包含)。
285
329
</td >
286
330
</tr >
@@ -289,7 +333,9 @@ itself should at least be protected via file permissions.
289
333
<code >string</code >
290
334
</td >
291
335
<td >
292
- <!-- PEM-encoded private key for the above certificate.-->
336
+ <!--
337
+ PEM-encoded private key for the above certificate.
338
+ -->
293
339
与上述证书对应的、PEM 编码的私钥。
294
340
</td >
295
341
</tr >
0 commit comments