@@ -20,12 +20,12 @@ auto_generated: true
20
20
21
21
## ` CredentialProviderRequest ` {#credentialprovider-kubelet-k8s-io-v1-CredentialProviderRequest}
22
22
23
+ <p >
23
24
<!--
24
25
CredentialProviderRequest includes the image that the kubelet requires authentication for.
25
26
Kubelet will pass this request object to the plugin via stdin. In general, plugins should
26
27
prefer responding with the same apiVersion they were sent.
27
28
-->
28
- <p >
29
29
CredentialProviderRequest 包含 kubelet 需要通过身份验证才能访问的镜像。
30
30
kubelet 将此请求对象通过 stdin 传递到插件。
31
31
通常,插件应优先使用所收到的 apiVersion 作出响应。
@@ -34,38 +34,75 @@ kubelet 将此请求对象通过 stdin 传递到插件。
34
34
<table class =" table " >
35
35
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
36
36
<tbody >
37
-
37
+
38
38
<tr ><td ><code >apiVersion</code ><br />string</td ><td ><code >credentialprovider.kubelet.k8s.io/v1</code ></td ></tr >
39
39
<tr ><td ><code >kind</code ><br />string</td ><td ><code >CredentialProviderRequest</code ></td ></tr >
40
-
41
-
40
+
41
+
42
42
<tr ><td ><code >image</code > <B ><!-- [Required]--> [必需]</B ><br />
43
43
<code >string</code >
44
44
</td >
45
45
<td >
46
+ <p >
46
47
<!--
47
48
image is the container image that is being pulled as part of the
48
49
credential provider plugin request. Plugins may optionally parse the image
49
50
to extract any information required to fetch credentials.
50
51
-->
51
- <p >
52
52
image 是作为凭据提供程序插件请求的一部分所拉取的容器镜像。
53
53
这些插件可以选择解析镜像以提取获取凭据所需的任何信息。
54
54
</p >
55
55
56
56
</td >
57
57
</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
+
58
95
</tbody >
59
96
</table >
60
97
61
98
## ` CredentialProviderResponse ` {#credentialprovider-kubelet-k8s-io-v1-CredentialProviderResponse}
62
99
100
+ <p >
63
101
<!--
64
102
CredentialProviderResponse holds credentials that the kubelet should use for the specified
65
103
image provided in the original request. Kubelet will read the response from the plugin via stdout.
66
104
This response should be set to the same apiVersion as CredentialProviderRequest.
67
105
-->
68
- <p >
69
106
CredentialProviderResponse 中包含 kubelet 应针对原始请求中所给镜像来使用的凭据。
70
107
kubelet 将通过 stdout 读取来自插件的响应。
71
108
此响应应被设置为与 CredentialProviderRequest 相同的 apiVersion。
@@ -74,21 +111,21 @@ kubelet 将通过 stdout 读取来自插件的响应。
74
111
<table class =" table " >
75
112
<thead ><tr ><th width =" 30% " ><!-- Field--> 字段</th ><th ><!-- Description--> 描述</th ></tr ></thead >
76
113
<tbody >
77
-
114
+
78
115
<tr ><td ><code >apiVersion</code ><br />string</td ><td ><code >credentialprovider.kubelet.k8s.io/v1</code ></td ></tr >
79
116
<tr ><td ><code >kind</code ><br />string</td ><td ><code >CredentialProviderResponse</code ></td ></tr >
80
-
81
-
117
+
118
+
82
119
<tr ><td ><code >cacheKeyType</code > <B ><!-- [Required]--> [必需]</B ><br />
83
120
<a href =" #credentialprovider-kubelet-k8s-io-v1-PluginCacheKeyType " ><code >PluginCacheKeyType</code ></a >
84
121
</td >
85
122
<td >
123
+ <p >
86
124
<!--
87
125
cacheKeyType indiciates the type of caching key to use based on the image provided
88
126
in the request. There are three valid values for the cache key type: Image, Registry, and
89
127
Global. If an invalid value is specified, the response will NOT be used by the kubelet.
90
128
-->
91
- <p >
92
129
cacheKeyType 标示了基于请求中提供的镜像要使用的缓存键的类型。
93
130
缓存键类型有三个有效值:Image、Registry 和 Global。
94
131
如果所指定的值无效,则此响应不会被 kubelet 使用。
@@ -99,13 +136,13 @@ cacheKeyType 标示了基于请求中提供的镜像要使用的缓存键的类
99
136
<a href =" https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration " ><code >meta/v1.Duration</code ></a >
100
137
</td >
101
138
<td >
139
+ <p >
102
140
<!--
103
141
cacheDuration indicates the duration the provided credentials should be cached for.
104
142
The kubelet will use this field to set the in-memory cache duration for credentials
105
143
in the AuthConfig. If null, the kubelet will use defaultCacheDuration provided in
106
144
CredentialProviderConfig. If set to 0, the kubelet will not cache the provided AuthConfig.
107
145
-->
108
- <p >
109
146
cacheDuration 标示所提供的凭据可被缓存的持续期。
110
147
kubelet 将使用此字段为 AuthConfig 中的凭据设置内存中缓存持续期。
111
148
如果为空,kubelet 将使用 CredentialProviderConfig 中提供的 defaultCacheDuration。
@@ -117,36 +154,36 @@ kubelet 将使用此字段为 AuthConfig 中的凭据设置内存中缓存持续
117
154
<a href =" #credentialprovider-kubelet-k8s-io-v1-AuthConfig " ><code >map[ string] AuthConfig</code ></a >
118
155
</td >
119
156
<td >
157
+ <p >
120
158
<!--
121
159
auth is a map containing authentication information passed into the kubelet.
122
160
Each key is a match image string (more on this below). The corresponding authConfig value
123
161
should be valid for all images that match against this key. A plugin should set
124
162
this field to null if no valid credentials can be returned for the requested image.
125
163
-->
126
- <p >
127
164
auth 是一个映射,包含传递给 kubelet 的身份验证信息。
128
165
映射中每个键都是一个匹配镜像字符串(更多内容见下文)。
129
166
相应的 authConfig 值应该对匹配此键的所有镜像有效。
130
167
如果无法为请求的镜像返回有效凭据,则插件应将此字段设置为空。
131
168
</p >
169
+ <p >
132
170
<!--
133
171
Each key in the map is a pattern which can optionally contain a port and a path.
134
172
Globs can be used in the domain, but not in the port or the path. Globs are supported
135
173
as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'.
136
174
Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match
137
175
a single subdomain segment, so *.io does not match *.k8s.io.</p>
138
176
-->
139
- <p >
140
177
映射中的每个主键都可以包含端口和路径。
141
178
域名中可以使用 Glob 通配,但不能在端口或路径中使用 Glob。
142
179
Glob 支持类似 <code >&ast ; .k8s.io</code > 或 <code >k8s.&ast ; .io</code > 这类子域以及 <code >k8s.&ast ; </code > 这类顶级域。
143
180
也支持匹配的部分子域,例如 <code >app&ast ; .k8s.io</code >。
144
181
每个 Glob 只能匹配一个子域段,因此 <code >&ast ; .io</code > 与 <code >&ast ; .k8s.io</code > 不匹配。
145
182
</p >
183
+ <p >
146
184
<!--
147
185
The kubelet will match images against the key when all of the below are true:
148
186
-->
149
- <p >
150
187
当满足以下所有条件时,kubelet 将根据主键来匹配镜像:
151
188
</p >
152
189
<ul >
@@ -163,10 +200,10 @@ If the imageMatch contains a port, then the port must match in the image as well
163
200
-->
164
201
<li >如果 imageMatch 包含端口,则此端口也必须在镜像中匹配。</li >
165
202
</ul >
203
+ <p >
166
204
<!--
167
205
When multiple keys are returned, the kubelet will traverse all keys in reverse order so that:
168
206
-->
169
- <p >
170
207
当返回多个主键时,kubelet 将以相反的顺序遍历所有主键,以便:
171
208
</p >
172
209
<ul >
@@ -179,11 +216,13 @@ When multiple keys are returned, the kubelet will traverse all keys in reverse o
179
216
-->
180
217
<li >非通配符键出现在具有相同前缀的通配符键之前。</li >
181
218
</ul >
219
+ <p >
182
220
<!--
183
221
For any given match, the kubelet will attempt an image pull with the provided credentials,
184
222
stopping after the first successfully authenticated pull.
185
223
-->
186
- <p >对于任一给定的匹配项,kubelet 将尝试用提供的凭据拉取镜像,并在第一次成功通过身份验证的拉取之后停止。</p >
224
+ 对于任一给定的匹配项,kubelet 将尝试用提供的凭据拉取镜像,并在第一次成功通过身份验证的拉取之后停止。
225
+ </p >
187
226
<!--
188
227
Example keys:
189
228
-->
@@ -209,12 +248,12 @@ Example keys:
209
248
210
249
- [ CredentialProviderResponse] ( #credentialprovider-kubelet-k8s-io-v1-CredentialProviderResponse )
211
250
251
+ <p >
212
252
<!--
213
253
AuthConfig contains authentication information for a container registry.
214
254
Only username/password based authentication is supported today, but more authentication
215
255
mechanisms may be added in the future.
216
256
-->
217
- <p >
218
257
AuthConfig 包含针对容器镜像仓库的身份验证信息。
219
258
目前仅支持基于用户名/密码的身份验证,但未来可能添加更多的身份验证机制。
220
259
</p >
@@ -227,11 +266,11 @@ AuthConfig 包含针对容器镜像仓库的身份验证信息。
227
266
<code >string</code >
228
267
</td >
229
268
<td >
269
+ <p >
230
270
<!--
231
271
username is the username used for authenticating to the container registry
232
272
An empty username is valid.
233
273
-->
234
- <p >
235
274
username 是对容器镜像仓库身份验证所用的用户名。
236
275
空白用户名是有效的。
237
276
</p >
@@ -241,11 +280,11 @@ username 是对容器镜像仓库身份验证所用的用户名。
241
280
<code >string</code >
242
281
</td >
243
282
<td >
283
+ <p >
244
284
<!--
245
285
password is the password used for authenticating to the container registry
246
286
An empty password is valid.
247
287
-->
248
- <p >
249
288
password 是对容器镜像仓库身份验证所用的密码。
250
289
空白密码是有效的。
251
290
</p >
@@ -267,4 +306,3 @@ password 是对容器镜像仓库身份验证所用的密码。
267
306
** 出现在:**
268
307
269
308
- [ CredentialProviderResponse] ( #credentialprovider-kubelet-k8s-io-v1-CredentialProviderResponse )
270
-
0 commit comments