pipe-cd/pipecd

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

Open

#4,639 创建于 2023年10月30日

在 GitHub 查看
 (5 评论) (0 反应) (1 负责人)Go (319 fork)auto 404
good first issue

仓库指标

Star
 (1,329 star)
PR 合并指标
 (PR 指标待抓取)

描述

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}))

贡献者指南