Skip to content

Commit 73182f9

Browse files
committed
[zh-cn]sync kubelet-config.v1alpha1.md
Signed-off-by: xin.li <[email protected]>
1 parent 900d48e commit 73182f9

File tree

1 file changed

+69
-46
lines changed

1 file changed

+69
-46
lines changed

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

Lines changed: 69 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Kubelet 配置 (v1alpha1)
2+
title: kubelet 配置 (v1alpha1)
33
content_type: tool-reference
44
package: kubelet.config.k8s.io/v1alpha1
55
---
@@ -26,15 +26,15 @@ each exec credential provider. Kubelet reads this configuration from disk and en
2626
each provider as specified by the CredentialProvider type.
2727
-->
2828
CredentialProviderConfig 包含有关每个 exec 凭据提供者的配置信息。
29-
Kubelet 从磁盘上读取这些配置信息,并根据 CredentialProvider 类型启用各个提供者。
29+
kubelet 从磁盘上读取这些配置信息,并根据 CredentialProvider 类型启用各个提供者。
3030

3131
<table class="table">
3232
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
3333
<tbody>
3434

3535
<tr><td><code>apiVersion</code><br/>string</td><td><code>kubelet.config.k8s.io/v1alpha1</code></td></tr>
3636
<tr><td><code>kind</code><br/>string</td><td><code>CredentialProviderConfig</code></td></tr>
37-
<tr><td><code>providers</code> <B>[必需]</B><br/>
37+
<tr><td><code>providers</code> <B><!--[Required]-->[必需]</B><br/>
3838
<a href="#kubelet-config-k8s-io-v1alpha1-CredentialProvider"><code>[]CredentialProvider</code></a>
3939
</td>
4040
<td>
@@ -66,10 +66,10 @@ ImagePullIntent 是 kubelet 尝试拉取镜像的记录。
6666
<table class="table">
6767
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
6868
<tbody>
69-
69+
7070
<tr><td><code>apiVersion</code><br/>string</td><td><code>kubelet.config.k8s.io/v1alpha1</code></td></tr>
7171
<tr><td><code>kind</code><br/>string</td><td><code>ImagePullIntent</code></td></tr>
72-
72+
7373
<tr><td><code>image</code> <B><!--[Required]-->[必需]</B><br/>
7474
<code>string</code>
7575
</td>
@@ -109,7 +109,7 @@ image represented by this record is being requested.
109109
<table class="table">
110110
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr>
111111
<tbody>
112-
112+
113113
<tr><td><code>apiVersion</code><br/>string</td><td><code>kubelet.config.k8s.io/v1alpha1</code></td></tr>
114114
<tr><td><code>kind</code><br/>string</td><td><code>ImagePulledRecord</code></td></tr>
115115

@@ -194,7 +194,7 @@ CredentialProvider 代表的是要被 kubelet 调用的一个 exec 插件。
194194
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
195195
<tbody>
196196

197-
<tr><td><code>name</code> <B>[必需]</B><br/>
197+
<tr><td><code>name</code> <B><!--[Required]-->[必需]</B><br/>
198198
<code>string</code>
199199
</td>
200200
<td>
@@ -205,29 +205,55 @@ provider executable as seen by the kubelet. The executable must be in the kubele
205205
bin directory (set by the --image-credential-provider-bin-dir flag).
206206
Required to be unique across all providers.
207207
-->
208-
<code>name</code> 是凭据提供者的名称(必需)。此名称必须与 kubelet
209-
所看到的提供者可执行文件的名称匹配。可执行文件必须位于 kubelet 的
210-
<code>bin</code> 目录(通过 <code>--image-credential-provider-bin-dir</code> 设置)下。
211-
必须在所有提供商之间保持唯一。
212-
<p>
208+
<code>name</code> 是凭据提供者的名称(必需)。此名称必须与 kubelet
209+
所看到的提供者可执行文件的名称匹配。可执行文件必须位于 kubelet 的
210+
<code>bin</code> 目录(通过 <code>--image-credential-provider-bin-dir</code> 设置)下。
211+
必须在所有提供商之间保持唯一。
212+
</p>
213213
</td>
214214
</tr>
215215

216-
<tr><td><code>matchImages</code> <B>[必需]</B><br/>
216+
<tr><td><code>matchImages</code> <B><!--[Required]-->[必需]</B><br/>
217217
<code>[]string</code>
218218
</td>
219219
<td>
220-
<!--matchImages is a required list of strings used to match against images in order to
220+
<p>
221+
<!--
222+
matchImages is a required list of strings used to match against images in order to
221223
determine if this provider should be invoked. If one of the strings matches the
222224
requested image from the kubelet, the plugin will be invoked and given a chance
223225
to provide credentials. Images are expected to contain the registry domain
224226
and URL path.
227+
-->
228+
<code>matchImages</code> 是一个必须设置的字符串列表,用来匹配镜像以便确定是否要调用此提供者。
229+
如果字符串之一与 kubelet 所请求的镜像匹配,则此插件会被调用并给予提供凭证的机会。
230+
镜像应该包含镜像库域名和 URL 路径。
231+
</p>
232+
<p>
233+
<!--
225234
Each entry in matchImages is a pattern which can optionally contain a port and a path.
226235
Globs can be used in the domain, but not in the port or the path. Globs are supported
227236
as subdomains like <code>*.k8s.io</code> or <code>k8s.*.io</code>, and top-level-domains such as <code>k8s.*</code>.
237+
-->
238+
<code>matchImages</code> 中的每个条目都是一个模式字符串,其中可以包含端口号和路径。
239+
域名部分可以包含统配符,但端口或路径部分不可以。通配符可以用作子域名,例如
240+
<code>*.k8s.io</code> 或 <code>k8s.*.io</code>,以及 <code>k8s.*</code> 这类顶级域名。
241+
</p>
242+
<p>
243+
<!--
228244
Matching partial subdomains like <code>app*.k8s.io</code> is also supported. Each glob can only match
229245
a single subdomain segment, so <code>*.io</code> does not match <code>*.k8s.io</code>.
246+
-->
247+
对类似 <code>app*.k8s.io</code> 这类部分子域名的匹配也是支持的。
248+
每个通配符只能用来匹配一个子域名段,所以 <code>*.io</code> 不会匹配 <code>*.k8s.io</code>。
249+
</p>
250+
<p>
251+
<!--
230252
A match exists between an image and a matchImage when all of the below are true:
253+
-->
254+
镜像与 <code>matchImages</code> 之间存在匹配时,以下条件都要满足:
255+
</p>
256+
<!--
231257
<ul>
232258
<li>Both contain the same number of domain parts and each part matches.</li>
233259
<li>The URL path of an imageMatch must be a prefix of the target image URL path.</li>
@@ -239,16 +265,7 @@ Example values of matchImages:
239265
- gcr.io
240266
- &lowast;.&lowast;.registry.io
241267
- registry.io:8080/path
242-
-->
243-
<p><code>matchImages</code> 是一个必须设置的字符串列表,用来匹配镜像以便确定是否要调用此提供者。
244-
如果字符串之一与 kubelet 所请求的镜像匹配,则此插件会被调用并给予提供凭证的机会。
245-
镜像应该包含镜像库域名和 URL 路径。</p>
246-
<p><code>matchImages</code> 中的每个条目都是一个模式字符串,其中可以包含端口号和路径。
247-
域名部分可以包含统配符,但端口或路径部分不可以。通配符可以用作子域名,例如
248-
<code>*.k8s.io</code> 或 <code>k8s.*.io</code>,以及顶级域名,如 <code>k8s.*</code>。</p>
249-
<p>对类似 <code>app*.k8s.io</code> 这类部分子域名的匹配也是支持的。
250-
每个通配符只能用来匹配一个子域名段,所以 <code>*.io</code> 不会匹配 <code>*.k8s.io</code>。</p>
251-
<p>镜像与 <code>matchImages</code> 之间存在匹配时,以下条件都要满足:</p>
268+
-->
252269
<ul>
253270
<li>二者均包含相同个数的域名部分,并且每个域名部分都对应匹配;</li>
254271
<li><code>matchImages</code> 条目中的 URL 路径部分必须是目标镜像的 URL 路径的前缀;</li>
@@ -265,26 +282,32 @@ Example values of matchImages:
265282
</td>
266283
</tr>
267284

268-
<tr><td><code>defaultCacheDuration</code> <B>[必需]</B><br/>
285+
<tr><td><code>defaultCacheDuration</code> <B><!--[Required]-->[必需]</B><br/>
269286
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"><code>meta/v1.Duration</code></a>
270287
</td>
271288
<td>
272-
<!--defaultCacheDuration is the default duration the plugin will cache credentials in-memory
273-
if a cache duration is not provided in the plugin response. This field is required.-->
289+
<!--
290+
defaultCacheDuration is the default duration the plugin will cache credentials in-memory
291+
if a cache duration is not provided in the plugin response. This field is required.
292+
-->
274293
<code>defaultCacheDuration</code> 是插件在内存中缓存凭据的默认时长,
275294
在插件响应中没有给出缓存时长时,使用这里设置的值。此字段是必需的。
276295
</td>
277296
</tr>
278297

279-
<tr><td><code>apiVersion</code> <B>[必需]</B><br/>
298+
<tr><td><code>apiVersion</code> <B><!--[Required]-->[必需]</B><br/>
280299
<code>string</code>
281300
</td>
282301
<td>
283-
<!--Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse
302+
<p>
303+
<!--
304+
Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse
284305
MUST use the same encoding version as the input. Current supported values are:
285-
- credentialprovider.kubelet.k8s.io/v1alpha1-->
286-
<p>要求 exec 插件 CredentialProviderRequest 请求的输入版本。
287-
所返回的 CredentialProviderResponse 必须使用与输入相同的编码版本。当前支持的值有:</p>
306+
- credentialprovider.kubelet.k8s.io/v1alpha1
307+
-->
308+
要求 exec 插件 CredentialProviderRequest 请求的输入版本。
309+
所返回的 CredentialProviderResponse 必须使用与输入相同的编码版本。当前支持的值有:
310+
</p>
288311
<ul>
289312
<li><code>credentialprovider.kubelet.k8s.io/v1alpha1</code></li>
290313
</ul>
@@ -295,19 +318,23 @@ MUST use the same encoding version as the input. Current supported values are:
295318
<code>[]string</code>
296319
</td>
297320
<td>
298-
<!--Arguments to pass to the command when executing it.-->
299-
在执行插件可执行文件时要传递给命令的参数。
321+
<!--
322+
Arguments to pass to the command when executing it.
323+
-->
324+
在执行插件可执行文件时要传递给命令的参数。
300325
</td>
301326
</tr>
302327

303328
<tr><td><code>env</code><br/>
304329
<a href="#kubelet-config-k8s-io-v1alpha1-ExecEnvVar"><code>[]ExecEnvVar</code></a>
305330
</td>
306331
<td>
307-
<!--Env defines additional environment variables to expose to the process. These
332+
<!--
333+
Env defines additional environment variables to expose to the process. These
308334
are unioned with the host's environment, as well as variables client-go uses
309-
to pass argument to the plugin.-->
310-
<code>env</code> 定义要提供给插件进程的额外的环境变量。
335+
to pass argument to the plugin.
336+
-->
337+
<code>env</code> 定义要提供给插件进程的额外的环境变量。
311338
这些环境变量会与主机上的其他环境变量以及 client-go 所使用的环境变量组合起来,
312339
一起传递给插件。
313340
</td>
@@ -334,7 +361,7 @@ ExecEnvVar 用来在执行基于 exec 的凭据插件时设置环境变量。
334361
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
335362
<tbody>
336363

337-
<tr><td><code>name</code> <B>[必需]</B><br/>
364+
<tr><td><code>name</code> <B><!--[Required]-->[必需]</B><br/>
338365
<code>string</code>
339366
</td>
340367
<td>
@@ -343,7 +370,7 @@ ExecEnvVar 用来在执行基于 exec 的凭据插件时设置环境变量。
343370
</td>
344371
</tr>
345372

346-
<tr><td><code>value</code> <B>[必需]</B><br/>
373+
<tr><td><code>value</code> <B><!--[Required]-->[必需]</B><br/>
347374
<code>string</code>
348375
</td>
349376
<td>
@@ -355,28 +382,25 @@ ExecEnvVar 用来在执行基于 exec 的凭据插件时设置环境变量。
355382
</table>
356383

357384
## `ImagePullCredentials` {#kubelet-config-k8s-io-v1alpha1-ImagePullCredentials}
358-
385+
359386
<!--
360387
**Appears in:**
361388
-->
362389
**出现在:**
363390

364391
- [ImagePulledRecord](#kubelet-config-k8s-io-v1alpha1-ImagePulledRecord)
365392

366-
367393
<p>
368394
<!--
369395
ImagePullCredentials describe credentials that can be used to pull an image.
370396
-->
371397
ImagePullCredentials 描述了可以用于拉取镜像的凭据。
372398
</p>
373399

374-
375400
<table class="table">
376401
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
377402
<tbody>
378-
379-
403+
380404
<tr><td><code>kubernetesSecrets</code><br/>
381405
<a href="#kubelet-config-k8s-io-v1alpha1-ImagePullSecret"><code>[]ImagePullSecret</code></a>
382406
</td>
@@ -415,7 +439,7 @@ If true, it is mutually exclusive with the <code>kubernetesSecrets</code> field.
415439
</table>
416440

417441
## `ImagePullSecret` {#kubelet-config-k8s-io-v1alpha1-ImagePullSecret}
418-
442+
419443
<!--
420444
**Appears in:**
421445
-->
@@ -470,4 +494,3 @@ credentialHash 是通过对镜像拉取凭据的内容进行哈希计算获得
470494
</tr>
471495
</tbody>
472496
</table>
473-

0 commit comments

Comments
 (0)