Skip to content

Commit 6e733ae

Browse files
authored
Merge pull request #47921 from tengqm/zh-fix-ssa
[zh] Resync server-side-apply page
2 parents 109d3ba + 3d846d3 commit 6e733ae

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

content/zh-cn/docs/reference/using-api/server-side-apply.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ by including a value for that field in a Server-Side Apply operation.
108108
显式更改字段管理器详细信息来实现。
109109
还可以通过在服务器端应用操作中包含字段的值来声明和记录字段管理器。
110110

111+
<!--
112+
A Server-Side Apply **patch** request requires the client to provide its identity
113+
as a [field manager](#managers). When using Server-Side Apply, trying to change a
114+
field that is controlled by a different manager results in a rejected
115+
request unless the client forces an override.
116+
For details of overrides, see [Conflicts](#conflicts).
117+
-->
118+
服务器端应用场景中的 **patch** 请求要求客户端提供自身的标识作为
119+
[字段管理器(Field Manager)](#managers)。使用服务器端应用时,
120+
如果尝试变更由别的管理器来控制的字段,会导致请求被拒绝,除非客户端强制要求进行覆盖。
121+
关于覆盖操作的细节,可参阅[冲突](#conflicts)节。
122+
111123
<!--
112124
When two or more appliers set a field to the same value, they share ownership of
113125
that field. Any subsequent attempt to change the value of the shared field, by any of
@@ -220,15 +232,14 @@ for example, the `.metadata.managedFields` get into an inconsistent state
220232
<!--
221233
The format of `managedFields` is [described](/docs/reference/kubernetes-api/common-definitions/object-meta/#System)
222234
in the Kubernetes API reference.
235+
-->
236+
`managedFields` 的格式在 Kubernetes API 参考中[描述](/zh-cn/docs/reference/kubernetes-api/common-definitions/object-meta/#System)。
223237

224238
{{< caution >}}
239+
<!--
225240
The `.metadata.managedFields` field is managed by the API server.
226241
You should avoid updating it manually.
227-
{{< /caution >}}
228242
-->
229-
`managedFields` 的格式在 Kubernetes API 参考中[描述](/zh-cn/docs/reference/kubernetes-api/common-definitions/object-meta/#System)。
230-
231-
{{< caution >}}
232243
`.metadata.managedFields` 字段由 API 服务器管理。
233244
你不应该手动更新它。
234245
{{< /caution >}}
@@ -255,13 +266,24 @@ this occurs, the applier has 3 options to resolve the conflicts:
255266
you use the `--force-conflicts` command line parameter), and make the request
256267
again. This forces the operation to succeed, changes the value of the field,
257268
and removes the field from all other managers' entries in `managedFields`.
269+
-->
270+
* **覆盖前值,成为唯一的管理器:** 如果打算覆盖该值(或应用者是一个自动化部件,比如控制器),
271+
应用者应该设置查询参数 `force` 为 true(对 `kubectl apply` 来说,你可以使用命令行参数
272+
`--force-conflicts`),然后再发送一次请求。
273+
这将强制操作成功,改变字段的值,从所有其他管理器的 `managedFields` 条目中删除指定字段。
258274

275+
<!--
259276
* **Don't overwrite value, give up management claim:** If the applier doesn't
260277
care about the value of the field any more, the applier can remove it from their
261278
local model of the resource, and make a new request with that particular field
262279
omitted. This leaves the value unchanged, and causes the field to be removed
263280
from the applier's entry in `managedFields`.
281+
-->
282+
* **不覆盖前值,放弃管理权:** 如果应用者不再关注该字段的值,
283+
应用者可以从资源的本地模型中删掉它,并在省略该字段的情况下发送请求。
284+
这就保持了原值不变,并从 `managedFields` 的应用者条目中删除该字段。
264285

286+
<!--
265287
* **Don't overwrite value, become shared manager:** If the applier still cares
266288
about the value of a field, but doesn't want to overwrite it, they can
267289
change the value of that field in their local model of the resource so as to
@@ -270,15 +292,6 @@ this occurs, the applier has 3 options to resolve the conflicts:
270292
and causes that field's management to be shared by the applier along with all
271293
other field managers that already claimed to manage it.
272294
-->
273-
* **覆盖前值,成为唯一的管理器:** 如果打算覆盖该值(或应用者是一个自动化部件,比如控制器),
274-
应用者应该设置查询参数 `force` 为 true(对 `kubectl apply` 来说,你可以使用命令行参数
275-
`--force-conflicts`),然后再发送一次请求。
276-
这将强制操作成功,改变字段的值,从所有其他管理器的 `managedFields` 条目中删除指定字段。
277-
278-
* **不覆盖前值,放弃管理权:** 如果应用者不再关注该字段的值,
279-
应用者可以从资源的本地模型中删掉它,并在省略该字段的情况下发送请求。
280-
这就保持了原值不变,并从 `managedFields` 的应用者条目中删除该字段。
281-
282295
* **不覆盖前值,成为共享的管理器:** 如果应用者仍然关注字段值,并不想覆盖它,
283296
他们可以更改资源的本地模型中该字段的值,以便与服务器上对象的值相匹配,
284297
然后基于本地更新发出新请求。这样做会保持值不变,

content/zh-cn/examples/application/ssa/nginx-deployment-replicas-only.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)