Merge pull request #49806 from my-git9/np-6372

[zh-cn]sync kubectl_apply/* kubectl_taint
pull/49855/head
Kubernetes Prow Robot 2025-02-24 04:58:28 -08:00 committed by GitHub
commit d9100c2163
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 72 additions and 31 deletions

View File

@ -348,6 +348,21 @@ If true, keep the managedFields when printing objects in JSON or YAML format.
</td>
</tr>
<tr>
<td colspan="2">--subresource string</td>
</tr>
<tr>
<td></td><td style="line-height: 130%; word-wrap: break-word;">
<p>
<!--
If specified, apply will operate on the subresource of the requested object. Only allowed when using --server-side. This flag is beta and may change in the future.
-->
如果指定此参数apply 将对请求对象的子资源进行操作。
仅在使用 --server-side 时允许指定此参数。此标志为 Beta 级别,将来可能会发生变化。
</p>
</td>
</tr>
<tr>
<td colspan="2">--template string</td>
</tr>
@ -378,18 +393,27 @@ The length of time to wait before giving up on a delete, zero means determine a
<td colspan="2">--validate string[="strict"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"strict"</td>
</tr>
<tr>
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
<td></td><td style="line-height: 130%; word-wrap: break-word;">
<p>
<!--
Must be one of: strict (or true), warn, ignore (or false).<br/>&quot;true&quot; or &quot;strict&quot; will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not.<br/>&quot;warn&quot; will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as &quot;ignore&quot; otherwise.<br/>&quot;false&quot; or &quot;ignore&quot; will not perform any schema validation, silently dropping any unknown or duplicate fields.
Must be one of: strict (or true), warn, ignore (or false).
&quot;true&quot; or &quot;strict&quot; will use a schema to validate the input and
fail the request if invalid. It will perform server side validation if ServerSideFieldValidation
is enabled on the api-server, but will fall back to less reliable client-side validation if not.
&quot;warn&quot; will warn about unknown or duplicate fields without blocking the request if
server-side field validation is enabled on the API server, and behave as &quot;ignore&quot; otherwise.
&quot;false&quot; or &quot;ignore&quot; will not perform any schema validation,
silently dropping any unknown or duplicate fields.
-->
必须是以下选项之一strict或 true、warn、ignore或 false<br/>
"true" 或 "strict" 将使用模式定义来验证输入,如果无效,则请求失败。
必须是以下选项之一strict或 true、warn、ignore或 false
&quot;true&quot;&quot;strict&quot; 将使用模式定义来验证输入,如果无效,则请求失败。
如果在 API 服务器上启用了 ServerSideFieldValidation则执行服务器端验证
但如果未启用,它将回退到可靠性较低的客户端验证。<br/>
如果在 API 服务器上启用了服务器端字段验证,"warn" 将警告未知或重复的字段而不阻止请求,
否则操作与 "ignore" 的表现相同。<br/>
"false" 或 "ignore" 将不会执行任何模式定义检查,而是静默删除所有未知或重复的字段。
</p></td>
但如果未启用此参数API 服务器将回退到可靠性较低的客户端验证。
如果在 API 服务器上启用了服务器端字段验证,&quot;warn&quot; 将警告未知或重复的字段而不阻止请求,
否则操作与 &quot;ignore&quot; 的表现相同。
&quot;false&quot;&quot;ignore&quot; 将不会执行任何模式定义检查,而是静默删除所有未知或重复的字段。
</p>
</td>
</tr>
<tr>

View File

@ -42,11 +42,11 @@ kubectl apply edit-last-applied (RESOURCE/NAME | -f FILENAME)
<!--
```
# Edit the last-applied-configuration annotations by type/name in YAML
kubectl apply edit-last-applied deployment/nginx
# Edit the last-applied-configuration annotations by file in JSON
kubectl apply edit-last-applied -f deploy.yaml -o json
# Edit the last-applied-configuration annotations by type/name in YAML
kubectl apply edit-last-applied deployment/nginx
# Edit the last-applied-configuration annotations by file in JSON
kubectl apply edit-last-applied -f deploy.yaml -o json
```
-->
```shell
@ -184,18 +184,27 @@ Template string or path to template file to use when -o=go-template, -o=go-templ
<td colspan="2">--validate string[="strict"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--Default:-->默认值:"strict"</td>
</tr>
<tr>
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>
<td></td><td style="line-height: 130%; word-wrap: break-word;">
<p>
<!--
Must be one of: strict (or true), warn, ignore (or false).<br/>&quot;true&quot; or &quot;strict&quot; will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not.<br/>&quot;warn&quot; will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as &quot;ignore&quot; otherwise.<br/>&quot;false&quot; or &quot;ignore&quot; will not perform any schema validation, silently dropping any unknown or duplicate fields.
Must be one of: strict (or true), warn, ignore (or false).
&quot;true&quot; or &quot;strict&quot; will use a schema to validate the input and
fail the request if invalid. It will perform server side validation if ServerSideFieldValidation
is enabled on the api-server, but will fall back to less reliable client-side validation if not.
&quot;warn&quot; will warn about unknown or duplicate fields without blocking the request if
server-side field validation is enabled on the API server, and behave as &quot;ignore&quot; otherwise.
&quot;false&quot; or &quot;ignore&quot; will not perform any schema validation,
silently dropping any unknown or duplicate fields.
-->
必须是以下选项之一strict或 true、warn、ignore或 false<br/>
"true" 或 "strict" 将使用模式定义来验证输入,如果无效,则请求失败。
必须是以下选项之一strict或 true、warn、ignore或 false
&quot;true&quot;&quot;strict&quot; 将使用模式定义来验证输入,如果无效,则请求失败。
如果在 API 服务器上启用了 ServerSideFieldValidation则执行服务器端验证
但如果未启用,它将回退到可靠性较低的客户端验证。<br/>
如果在 API 服务器上启用了服务器端字段验证,"warn" 将警告未知或重复的字段而不阻止请求,
否则操作与 "ignore" 的表现相同。<br/>
"false" 或 "ignore" 将不会执行任何模式定义检查,而是静默删除所有未知或重复的字段。
</p></td>
但如果未启用此参数,它将回退到可靠性较低的客户端验证。
如果在 API 服务器上启用了服务器端字段验证,&quot;warn&quot; 将警告未知或重复的字段而不阻止请求,
否则操作与 &quot;ignore&quot; 的表现相同。
&quot;false&quot;&quot;ignore&quot; 将不会执行任何模式定义检查,而是静默删除所有未知或重复的字段。
</p>
</td>
</tr>
<tr>
@ -207,7 +216,8 @@ Must be one of: strict (or true), warn, ignore (or false).<br/>&quot;true&quot;
Only relevant if --edit=true. Defaults to the line ending native to your platform.
-->
仅在 --edit=true 时起作用。默认为你所用平台本地的行结尾格式。
</p></td>
</p>
</td>
</tr>
</tbody>

View File

@ -228,15 +228,22 @@ Template string or path to template file to use when -o=go-template, -o=go-templ
<td></td><td style="line-height: 130%; word-wrap: break-word;">
<p>
<!--
Must be one of: strict (or true), warn, ignore (or false).<br/>&quot;true&quot; or &quot;strict&quot; will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not.<br/>&quot;warn&quot; will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as &quot;ignore&quot; otherwise.<br/>&quot;false&quot; or &quot;ignore&quot; will not perform any schema validation, silently dropping any unknown or duplicate fields.
Must be one of: strict (or true), warn, ignore (or false).
&quot;true&quot; or &quot;strict&quot; will use a schema to validate the input and
fail the request if invalid. It will perform server side validation if ServerSideFieldValidation
is enabled on the api-server, but will fall back to less reliable client-side validation if not.
&quot;warn&quot; will warn about unknown or duplicate fields without blocking the request if
server-side field validation is enabled on the API server, and behave as &quot;ignore&quot; otherwise.
&quot;false&quot; or &quot;ignore&quot; will not perform any schema validation,
silently dropping any unknown or duplicate fields.
-->
必须是以下选项之一strict或 true、warn、ignore或 false<br/>
"true" 或 "strict" 将使用模式定义来验证输入,如果无效,则请求失败。
必须是以下选项之一strict或 true、warn、ignore或 false
&quot;true&quot;&quot;strict&quot; 将使用模式定义来验证输入,如果无效,则请求失败。
如果在 API 服务器上启用了 ServerSideFieldValidation则执行服务器端验证
但如果未启用,它将回退到可靠性较低的客户端验证。<br/>
如果在 API 服务器上启用了服务器端字段验证,"warn" 将警告未知或重复的字段而不阻止请求,
否则操作与 "ignore" 的表现相同。<br/>
"false" 或 "ignore" 将不会执行任何模式定义检查,而是静默删除所有未知或重复的字段。
但如果未启用此参数,它将回退到可靠性较低的客户端验证。
如果在 API 服务器上启用了服务器端字段验证,&quot;warn&quot; 将警告未知或重复的字段而不阻止请求,
否则操作与 &quot;ignore&quot; 的表现相同。
&quot;false&quot;&quot;ignore&quot; 将不会执行任何模式定义检查,而是静默删除所有未知或重复的字段。
</p>
</td>
</tr>