I would like to be able to patch an existing resource using Argo CD. OpenShift freshly installed, out of the box, comes with a lot of resources/objects already there. This has been brought up before.
Example: Patching an existing deployment
apiVersion: apps/v1 kind: Deployment metadata: name: mydeploy annotations: argocd.argoproj.io/apply-type: patch spec: replicas: 3
In this case, I don't have to provide the whole manifest. Just what I want to patch. The annotation is to flag argo to perform a "patch" on this resource instead of an apply. Effectively doing:
kubectl patch <resource>/<name> --patch $(cat patch.yaml)
If the resource doesn't exist, it should fall back to using "apply", or fail outright.
- is related to
-
RFE-2702 Full support for Red Hat COP patch operator
- Deferred