@@ -108,6 +108,18 @@ by including a value for that field in a Server-Side Apply operation.
108
108
显式更改字段管理器详细信息来实现。
109
109
还可以通过在服务器端应用操作中包含字段的值来声明和记录字段管理器。
110
110
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
+
111
123
<!--
112
124
When two or more appliers set a field to the same value, they share ownership of
113
125
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
220
232
<!--
221
233
The format of `managedFields` is [described](/docs/reference/kubernetes-api/common-definitions/object-meta/#System)
222
234
in the Kubernetes API reference.
235
+ -->
236
+ ` managedFields` 的格式在 Kubernetes API 参考中[描述](/zh-cn/docs/reference/kubernetes-api/common-definitions/object-meta/#System)。
223
237
224
238
{{< caution >}}
239
+ <!--
225
240
The `.metadata.managedFields` field is managed by the API server.
226
241
You should avoid updating it manually.
227
- {{< /caution >}}
228
242
-->
229
- ` managedFields` 的格式在 Kubernetes API 参考中[描述](/zh-cn/docs/reference/kubernetes-api/common-definitions/object-meta/#System)。
230
-
231
- {{< caution >}}
232
243
` .metadata.managedFields` 字段由 API 服务器管理。
233
244
你不应该手动更新它。
234
245
{{< /caution >}}
@@ -255,13 +266,24 @@ this occurs, the applier has 3 options to resolve the conflicts:
255
266
you use the `--force-conflicts` command line parameter), and make the request
256
267
again. This forces the operation to succeed, changes the value of the field,
257
268
and removes the field from all other managers' entries in `managedFields`.
269
+ -->
270
+ * **覆盖前值,成为唯一的管理器:** 如果打算覆盖该值(或应用者是一个自动化部件,比如控制器),
271
+ 应用者应该设置查询参数 `force` 为 true(对 `kubectl apply` 来说,你可以使用命令行参数
272
+ ` --force-conflicts` ),然后再发送一次请求。
273
+ 这将强制操作成功,改变字段的值,从所有其他管理器的 `managedFields` 条目中删除指定字段。
258
274
275
+ <!--
259
276
* **Don't overwrite value, give up management claim:** If the applier doesn't
260
277
care about the value of the field any more, the applier can remove it from their
261
278
local model of the resource, and make a new request with that particular field
262
279
omitted. This leaves the value unchanged, and causes the field to be removed
263
280
from the applier's entry in `managedFields`.
281
+ -->
282
+ * **不覆盖前值,放弃管理权:** 如果应用者不再关注该字段的值,
283
+ 应用者可以从资源的本地模型中删掉它,并在省略该字段的情况下发送请求。
284
+ 这就保持了原值不变,并从 `managedFields` 的应用者条目中删除该字段。
264
285
286
+ <!--
265
287
* **Don't overwrite value, become shared manager:** If the applier still cares
266
288
about the value of a field, but doesn't want to overwrite it, they can
267
289
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:
270
292
and causes that field's management to be shared by the applier along with all
271
293
other field managers that already claimed to manage it.
272
294
-->
273
- * **覆盖前值,成为唯一的管理器:** 如果打算覆盖该值(或应用者是一个自动化部件,比如控制器),
274
- 应用者应该设置查询参数 `force` 为 true(对 `kubectl apply` 来说,你可以使用命令行参数
275
- ` --force-conflicts` ),然后再发送一次请求。
276
- 这将强制操作成功,改变字段的值,从所有其他管理器的 `managedFields` 条目中删除指定字段。
277
-
278
- * **不覆盖前值,放弃管理权:** 如果应用者不再关注该字段的值,
279
- 应用者可以从资源的本地模型中删掉它,并在省略该字段的情况下发送请求。
280
- 这就保持了原值不变,并从 `managedFields` 的应用者条目中删除该字段。
281
-
282
295
* **不覆盖前值,成为共享的管理器:** 如果应用者仍然关注字段值,并不想覆盖它,
283
296
他们可以更改资源的本地模型中该字段的值,以便与服务器上对象的值相匹配,
284
297
然后基于本地更新发出新请求。这样做会保持值不变,
0 commit comments