pipecd icon indicating copy to clipboard operation
pipecd copied to clipboard

Support `--force-conflicts` option for kubectl Server-Side Apply

Open tetsuya28 opened this issue 2 years ago • 5 comments

What would you like to be added: Support --force-conflicts option for kubectl Server-Side Apply.

Why is this needed: When use a KubernetesApp, with PipeCD Server-Side Apply, a piped gets the error, Failed to apply manifest, for a resource that has applied with Client-Side Apply and has been modified.

Failed to apply manifest: name="XXX", kind="XXX", namespace="XXX", apiVersion="XXX" (%!w(*fmt.wrapError=&{failed to apply: error: Operation cannot be fulfilled on XXX "XXX": the object has been modified; please apply your changes to the latest version and try again
Please review the fields above--they currently have other managers. Here
are the ways you can resolve this warning:
* If you intend to manage all of these fields, please re-run the apply
  command with the `--force-conflicts` flag.
* If you do not intend to manage all of the fields, please edit your
  manifest to remove references to the fields that should keep their
  current managers.
* You may co-own fields by updating your manifest to match the existing
  value; in this case, you'll become the manager if the other manager(s)
  stop managing the field (remove it from their configuration).
See http://k8s.io/docs/reference/using-api/api-concepts/#conflicts
 (exit status 1) 0xc0260e7160}))

tetsuya28 avatar Oct 30 '23 04:10 tetsuya28

is this require a new label? or we can have under kubernetesdeploymentinput, I would Server-Side Apply also to be an option here @khanhtc1202 @kentakozuka wdyt?

hungran avatar Nov 18 '23 16:11 hungran

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar May 17 '24 00:05 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity. Feel free to reopen if still applicable.

github-actions[bot] avatar May 24 '24 00:05 github-actions[bot]