@@ -294,6 +294,47 @@ manifest will not be updated by it.
294294Instead of create the second `ManifestWork`, user can also set HPA for this deployment. HPA will also take the ownership
295295of `replicas`, and the update of `replicas` field in the first `ManifestWork` will return conflict condition.
296296
297+ # # Ignore fields in Server Side Apply
298+
299+ To avoid work-agent returning conflict error, when using ServerSideApply as the update strategy, users can specify certain
300+ fields to be ignored, such that when work agent is applying the resource to the `ManagedCluster`, the change on the
301+ specified fields will not be updated onto the resource.
302+
303+ It is useful when other actors on the `ManagedCluster` is updating the same field on the resources
304+ that the `ManifestWork` is owning. One example as below :
305+
306+ ` ` ` yaml
307+ apiVersion: work.open-cluster-management.io/v1
308+ kind: ManifestWork
309+ metadata:
310+ namespace: <target managed cluster>
311+ name: hello-work-demo
312+ spec:
313+ workload: ...
314+ manifestConfigs:
315+ - resourceIdentifier:
316+ resource: configmaps
317+ namespace: default
318+ name: some-configmap
319+ updateStrategy:
320+ type: ServerSideApply
321+ force: true
322+ serverSideApply:
323+ ignoreFields:
324+ - condition: OnSpokePresent
325+ jsonPaths:
326+ - .data
327+ ` ` `
328+
329+ It indicates that when the configmap is applied on the `ManagedCluster`, any additional change
330+ on the data field will be ignored by the work agent, no matter the change comes from another
331+ actor on the `ManagedCluster`, or from this or another `ManifestWork`. It applies as long as the
332+ configmap exists on the `ManagedCluster`.
333+
334+ Alternatively, user can also set the condition field in the above example to `OnSpokeChange`, which
335+ indicates that the change of the data field will not be ignored if it comes from this `ManifestWork`
336+ However, change from other actors on the `ManagedCluster` will be ignored.
337+
297338# # Permission setting for work agent
298339
299340All workload manifests are applied to the managed cluster by the work agent, and by default the work agent has the
0 commit comments