Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-1240

Support patching existing resource

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Done
    • Icon: Major Major
    • 1.7.0
    • None
    • ArgoCD
    • Support patching existing resource
    • False
    • False
    • 0% To Do, 0% In Progress, 100% Done
    • Undefined

      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.

              jfischer@redhat.com Jann Fischer
              rh-ee-chernand Christian Hernandez (Inactive)
              Votes:
              10 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: