Skip to content

Commit 615060b

Browse files
committed
[zh-cn]sync kubelet-credentialprovider.v1.md
Signed-off-by: xin.li <[email protected]>
1 parent d6b9481 commit 615060b

File tree

2 files changed

+73
-35
lines changed

2 files changed

+73
-35
lines changed

content/zh-cn/docs/reference/config-api/apiserver-audit.v1.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ auto_generated: true
1919
- [EventList](#audit-k8s-io-v1-EventList)
2020
- [Policy](#audit-k8s-io-v1-Policy)
2121
- [PolicyList](#audit-k8s-io-v1-PolicyList)
22-
22+
2323
## `Event` {#audit-k8s-io-v1-Event}
2424

2525
<!--
@@ -68,7 +68,7 @@ Event 结构包含可出现在 API 审计日志中的所有信息。
6868
</p>
6969
</td>
7070
</tr>
71-
71+
7272
<tr><td><code>stage</code> <B><!--[Required]-->[必需]</B><br/>
7373
<a href="#audit-k8s-io-v1-Stage"><code>Stage</code></a>
7474
</td>
@@ -111,7 +111,7 @@ Event 结构包含可出现在 API 审计日志中的所有信息。
111111
</tr>
112112

113113
<tr><td><code>user</code> <B><!--[Required]-->[必需]</B><br/>
114-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#userinfo-v1-authentication-k8s-io"><code>authentication/v1.UserInfo</code></a>
114+
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#userinfo-v1-authentication-k8s-io"><code>authentication/v1.UserInfo</code></a>
115115
</td>
116116
<td>
117117
<p>
@@ -124,7 +124,7 @@ Event 结构包含可出现在 API 审计日志中的所有信息。
124124
</tr>
125125

126126
<tr><td><code>impersonatedUser</code><br/>
127-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#userinfo-v1-authentication-k8s-io"><code>authentication/v1.UserInfo</code></a>
127+
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#userinfo-v1-authentication-k8s-io"><code>authentication/v1.UserInfo</code></a>
128128
</td>
129129
<td>
130130
<p>
@@ -204,7 +204,7 @@ Note: All but the last IP can be arbitrarily set by the client.
204204
</tr>
205205

206206
<tr><td><code>responseStatus</code><br/>
207-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#status-v1-meta"><code>meta/v1.Status</code></a>
207+
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#status-v1-meta"><code>meta/v1.Status</code></a>
208208
</td>
209209
<td>
210210
<p>
@@ -257,7 +257,7 @@ Note: All but the last IP can be arbitrarily set by the client.
257257
</tr>
258258

259259
<tr><td><code>requestReceivedTimestamp</code><br/>
260-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
260+
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
261261
</td>
262262
<td>
263263
<!--
@@ -270,7 +270,7 @@ Note: All but the last IP can be arbitrarily set by the client.
270270
</tr>
271271

272272
<tr><td><code>stageTimestamp</code><br/>
273-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
273+
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#microtime-v1-meta"><code>meta/v1.MicroTime</code></a>
274274
</td>
275275
<td>
276276
<p>
@@ -326,7 +326,7 @@ EventList 是审计事件(Event)的列表。
326326
<tr><td><code>kind</code><br/>string</td><td><code>EventList</code></td></tr>
327327

328328
<tr><td><code>metadata</code><br/>
329-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
329+
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
330330
</td>
331331
<td>
332332
<span class="text-muted"><!--No description provided.-->列表结构元数据</span>
@@ -368,7 +368,7 @@ Policy 定义的是审计日志的配置以及不同类型请求的日志记录
368368
<tr><td><code>kind</code><br/>string</td><td><code>Policy</code></td></tr>
369369

370370
<tr><td><code>metadata</code><br/>
371-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#objectmeta-v1-meta"><code>meta/v1.ObjectMeta</code></a>
371+
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#objectmeta-v1-meta"><code>meta/v1.ObjectMeta</code></a>
372372
</td>
373373
<td>
374374
<p>
@@ -458,7 +458,7 @@ PolicyList 是由审计策略(Policy)组成的列表。
458458
<tr><td><code>kind</code><br/>string</td><td><code>PolicyList</code></td></tr>
459459

460460
<tr><td><code>metadata</code><br/>
461-
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
461+
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#listmeta-v1-meta"><code>meta/v1.ListMeta</code></a>
462462
</td>
463463
<td>
464464
<span class="text-muted"><!--No description provided.-->列表结构元数据。</span>
@@ -564,7 +564,7 @@ overlap with each other.</p>
564564

565565
## `Level` {#audit-k8s-io-v1-Level}
566566

567-
<!--
567+
<!--
568568
(Alias of `string`)
569569
-->
570570
<code>string</code> 数据类型的别名。
@@ -586,7 +586,7 @@ Level 定义的是审计过程中在日志内记录的信息量。
586586

587587
## `ObjectReference` {#audit-k8s-io-v1-ObjectReference}
588588

589-
<!--
589+
<!--
590590
**Appears in:**
591591
-->
592592
**出现在:**
@@ -681,9 +681,9 @@ ObjectReference 包含的是用来检查或修改所引用对象时将需要的
681681
</tr>
682682
</tbody>
683683
</table>
684-
684+
685685
## `PolicyRule` {#audit-k8s-io-v1-PolicyRule}
686-
686+
687687
<!--
688688
**Appears in:**
689689
-->
@@ -873,7 +873,7 @@ Policy.OmitManagedFields will stand.</li>
873873

874874
## `Stage` {#audit-k8s-io-v1-Stage}
875875

876-
<!--
876+
<!--
877877
(Alias of `string`)
878878
-->
879879
<code>string</code> 数据类型的别名。

content/zh-cn/docs/reference/config-api/kubelet-credentialprovider.v1.md

Lines changed: 58 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ auto_generated: true
2020

2121
## `CredentialProviderRequest` {#credentialprovider-kubelet-k8s-io-v1-CredentialProviderRequest}
2222

23+
<p>
2324
<!--
2425
CredentialProviderRequest includes the image that the kubelet requires authentication for.
2526
Kubelet will pass this request object to the plugin via stdin. In general, plugins should
2627
prefer responding with the same apiVersion they were sent.
2728
-->
28-
<p>
2929
CredentialProviderRequest 包含 kubelet 需要通过身份验证才能访问的镜像。
3030
kubelet 将此请求对象通过 stdin 传递到插件。
3131
通常,插件应优先使用所收到的 apiVersion 作出响应。
@@ -34,38 +34,75 @@ kubelet 将此请求对象通过 stdin 传递到插件。
3434
<table class="table">
3535
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
3636
<tbody>
37-
37+
3838
<tr><td><code>apiVersion</code><br/>string</td><td><code>credentialprovider.kubelet.k8s.io/v1</code></td></tr>
3939
<tr><td><code>kind</code><br/>string</td><td><code>CredentialProviderRequest</code></td></tr>
40-
41-
40+
41+
4242
<tr><td><code>image</code> <B><!--[Required]-->[必需]</B><br/>
4343
<code>string</code>
4444
</td>
4545
<td>
46+
<p>
4647
<!--
4748
image is the container image that is being pulled as part of the
4849
credential provider plugin request. Plugins may optionally parse the image
4950
to extract any information required to fetch credentials.
5051
-->
51-
<p>
5252
image 是作为凭据提供程序插件请求的一部分所拉取的容器镜像。
5353
这些插件可以选择解析镜像以提取获取凭据所需的任何信息。
5454
</p>
5555

5656
</td>
5757
</tr>
58+
59+
<tr><td><code>serviceAccountToken</code> <B><!--[Required]-->[必需]</B><br/>
60+
<code>string</code>
61+
</td>
62+
<td>
63+
<p>
64+
<!--
65+
serviceAccountToken is the service account token bound to the pod for which
66+
the image is being pulled. This token is only sent to the plugin if the
67+
tokenAttributes.serviceAccountTokenAudience field is configured in the kubelet's credential
68+
provider configuration.
69+
-->
70+
serviceAccountToken 是与正在拉取镜像的 Pod 绑定的服务帐号令牌。
71+
只有在 kubelet 的凭证提供者配置中设置了
72+
tokenAttributes.serviceAccountTokenAudience 字段时,
73+
才会将此令牌发送给插件。
74+
</p>
75+
</td>
76+
</tr>
77+
<tr><td><code>serviceAccountAnnotations</code> <B><!--[Required]-->[必需]</B><br/>
78+
<code>map[string]string</code>
79+
</td>
80+
<td>
81+
<p>
82+
<!--
83+
serviceAccountAnnotations is a map of annotations on the service account bound to the
84+
pod for which the image is being pulled. The list of annotations in the service account
85+
that need to be passed to the plugin is configured in the kubelet's credential provider
86+
configuration.
87+
-->
88+
serviceAccountAnnotations 与正在拉取镜像的 Pod
89+
绑定的服务帐号上的注解映射。需要传递给插件的服务帐号中的注解列表在
90+
kubelet 的凭证提供者配置中进行配置。
91+
</p>
92+
</td>
93+
</tr>
94+
5895
</tbody>
5996
</table>
6097

6198
## `CredentialProviderResponse` {#credentialprovider-kubelet-k8s-io-v1-CredentialProviderResponse}
6299

100+
<p>
63101
<!--
64102
CredentialProviderResponse holds credentials that the kubelet should use for the specified
65103
image provided in the original request. Kubelet will read the response from the plugin via stdout.
66104
This response should be set to the same apiVersion as CredentialProviderRequest.
67105
-->
68-
<p>
69106
CredentialProviderResponse 中包含 kubelet 应针对原始请求中所给镜像来使用的凭据。
70107
kubelet 将通过 stdout 读取来自插件的响应。
71108
此响应应被设置为与 CredentialProviderRequest 相同的 apiVersion。
@@ -74,21 +111,21 @@ kubelet 将通过 stdout 读取来自插件的响应。
74111
<table class="table">
75112
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
76113
<tbody>
77-
114+
78115
<tr><td><code>apiVersion</code><br/>string</td><td><code>credentialprovider.kubelet.k8s.io/v1</code></td></tr>
79116
<tr><td><code>kind</code><br/>string</td><td><code>CredentialProviderResponse</code></td></tr>
80-
81-
117+
118+
82119
<tr><td><code>cacheKeyType</code> <B><!--[Required]-->[必需]</B><br/>
83120
<a href="#credentialprovider-kubelet-k8s-io-v1-PluginCacheKeyType"><code>PluginCacheKeyType</code></a>
84121
</td>
85122
<td>
123+
<p>
86124
<!--
87125
cacheKeyType indiciates the type of caching key to use based on the image provided
88126
in the request. There are three valid values for the cache key type: Image, Registry, and
89127
Global. If an invalid value is specified, the response will NOT be used by the kubelet.
90128
-->
91-
<p>
92129
cacheKeyType 标示了基于请求中提供的镜像要使用的缓存键的类型。
93130
缓存键类型有三个有效值:Image、Registry 和 Global。
94131
如果所指定的值无效,则此响应不会被 kubelet 使用。
@@ -99,13 +136,13 @@ cacheKeyType 标示了基于请求中提供的镜像要使用的缓存键的类
99136
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
100137
</td>
101138
<td>
139+
<p>
102140
<!--
103141
cacheDuration indicates the duration the provided credentials should be cached for.
104142
The kubelet will use this field to set the in-memory cache duration for credentials
105143
in the AuthConfig. If null, the kubelet will use defaultCacheDuration provided in
106144
CredentialProviderConfig. If set to 0, the kubelet will not cache the provided AuthConfig.
107145
-->
108-
<p>
109146
cacheDuration 标示所提供的凭据可被缓存的持续期。
110147
kubelet 将使用此字段为 AuthConfig 中的凭据设置内存中缓存持续期。
111148
如果为空,kubelet 将使用 CredentialProviderConfig 中提供的 defaultCacheDuration。
@@ -117,36 +154,36 @@ kubelet 将使用此字段为 AuthConfig 中的凭据设置内存中缓存持续
117154
<a href="#credentialprovider-kubelet-k8s-io-v1-AuthConfig"><code>map[string]AuthConfig</code></a>
118155
</td>
119156
<td>
157+
<p>
120158
<!--
121159
auth is a map containing authentication information passed into the kubelet.
122160
Each key is a match image string (more on this below). The corresponding authConfig value
123161
should be valid for all images that match against this key. A plugin should set
124162
this field to null if no valid credentials can be returned for the requested image.
125163
-->
126-
<p>
127164
auth 是一个映射,包含传递给 kubelet 的身份验证信息。
128165
映射中每个键都是一个匹配镜像字符串(更多内容见下文)。
129166
相应的 authConfig 值应该对匹配此键的所有镜像有效。
130167
如果无法为请求的镜像返回有效凭据,则插件应将此字段设置为空。
131168
</p>
169+
<p>
132170
<!--
133171
Each key in the map is a pattern which can optionally contain a port and a path.
134172
Globs can be used in the domain, but not in the port or the path. Globs are supported
135173
as subdomains like '&ast;.k8s.io' or 'k8s.&ast;.io', and top-level-domains such as 'k8s.&ast;'.
136174
Matching partial subdomains like 'app&ast;.k8s.io' is also supported. Each glob can only match
137175
a single subdomain segment, so &ast;.io does not match &ast;.k8s.io.</p>
138176
-->
139-
<p>
140177
映射中的每个主键都可以包含端口和路径。
141178
域名中可以使用 Glob 通配,但不能在端口或路径中使用 Glob。
142179
Glob 支持类似 <code>&ast;.k8s.io</code> 或 <code>k8s.&ast;.io</code> 这类子域以及 <code>k8s.&ast;</code> 这类顶级域。
143180
也支持匹配的部分子域,例如 <code>app&ast;.k8s.io</code>。
144181
每个 Glob 只能匹配一个子域段,因此 <code>&ast;.io</code> 与 <code>&ast;.k8s.io</code> 不匹配。
145182
</p>
183+
<p>
146184
<!--
147185
The kubelet will match images against the key when all of the below are true:
148186
-->
149-
<p>
150187
当满足以下所有条件时,kubelet 将根据主键来匹配镜像:
151188
</p>
152189
<ul>
@@ -163,10 +200,10 @@ If the imageMatch contains a port, then the port must match in the image as well
163200
-->
164201
<li>如果 imageMatch 包含端口,则此端口也必须在镜像中匹配。</li>
165202
</ul>
203+
<p>
166204
<!--
167205
When multiple keys are returned, the kubelet will traverse all keys in reverse order so that:
168206
-->
169-
<p>
170207
当返回多个主键时,kubelet 将以相反的顺序遍历所有主键,以便:
171208
</p>
172209
<ul>
@@ -179,11 +216,13 @@ When multiple keys are returned, the kubelet will traverse all keys in reverse o
179216
-->
180217
<li>非通配符键出现在具有相同前缀的通配符键之前。</li>
181218
</ul>
219+
<p>
182220
<!--
183221
For any given match, the kubelet will attempt an image pull with the provided credentials,
184222
stopping after the first successfully authenticated pull.
185223
-->
186-
<p>对于任一给定的匹配项,kubelet 将尝试用提供的凭据拉取镜像,并在第一次成功通过身份验证的拉取之后停止。</p>
224+
对于任一给定的匹配项,kubelet 将尝试用提供的凭据拉取镜像,并在第一次成功通过身份验证的拉取之后停止。
225+
</p>
187226
<!--
188227
Example keys:
189228
-->
@@ -209,12 +248,12 @@ Example keys:
209248

210249
- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1-CredentialProviderResponse)
211250

251+
<p>
212252
<!--
213253
AuthConfig contains authentication information for a container registry.
214254
Only username/password based authentication is supported today, but more authentication
215255
mechanisms may be added in the future.
216256
-->
217-
<p>
218257
AuthConfig 包含针对容器镜像仓库的身份验证信息。
219258
目前仅支持基于用户名/密码的身份验证,但未来可能添加更多的身份验证机制。
220259
</p>
@@ -227,11 +266,11 @@ AuthConfig 包含针对容器镜像仓库的身份验证信息。
227266
<code>string</code>
228267
</td>
229268
<td>
269+
<p>
230270
<!--
231271
username is the username used for authenticating to the container registry
232272
An empty username is valid.
233273
-->
234-
<p>
235274
username 是对容器镜像仓库身份验证所用的用户名。
236275
空白用户名是有效的。
237276
</p>
@@ -241,11 +280,11 @@ username 是对容器镜像仓库身份验证所用的用户名。
241280
<code>string</code>
242281
</td>
243282
<td>
283+
<p>
244284
<!--
245285
password is the password used for authenticating to the container registry
246286
An empty password is valid.
247287
-->
248-
<p>
249288
password 是对容器镜像仓库身份验证所用的密码。
250289
空白密码是有效的。
251290
</p>
@@ -267,4 +306,3 @@ password 是对容器镜像仓库身份验证所用的密码。
267306
**出现在:**
268307

269308
- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1-CredentialProviderResponse)
270-

0 commit comments

Comments
 (0)