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

"managed-by" Namespace label being reset to the name of the target namespace.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.1
    • 1.2
    • Operator
    • None
    • GITOPS Sprint 206

      Use Case:

      I want to create and manage new "tenant" Argo CD instances from the "default" Argo CD instance created by the OpenShift GitOps operator.

      To do so, I have would have an Argo CD "Application" that would point to a git repository that contains:
      1. A kustomization.yaml file.
      2. A namespace.yaml file that includes the "managed-by" label with a value of "openshift-gitops"
      3. An Argo CD CR that will create a new instance of Argo CD in the new namespace.

       

      However, when I try this process with OpenShift GitOps 1.2, the "managed-by" value keeps getting reset to the name of the new namespace (in my case, "argocd").  This causes all sorts of problems, including a synchronization loop in the "Application" in the default Argo CD instance as it keeps trying to "fix" the label by changing the value back to "openshift-gitops", only to have it reverted again to "argocd".

      Finally, without the new argocd namespace having the proper "managed-by" label, it seems the OpenShift GitOps default Argo CD instance does not have the correct rights to create an "Argo CD" instance in the new namespace.

      I'll include a demo repository as a test case shortly.

      EDIT: It seems its the new Argo CD instance that is changing the "managed-by" label.  Essentially, when you deploy an Argo CD instance into a namespace, it changes the "managed-by" label to be it's own namespace.  This sort of makes sense, but causes problems if you want the "cluster" level Argo CD to manage "developer"-level Argo CD instances.

       

      This is first to be checked into the release branch of GitOps 1.2, because we have kind of code freeze on master until the Operator SDK upgrade is done.

       https://github.com/redhat-developer/gitops-operator/tree/v1.2
      https://github.com/argoproj-labs/argocd-operator/tree/rhos-v1.2

      Need to be backport to master branch.

       

              shuagarw@redhat.com Shubham Agarwal (Inactive)
              rhn-support-apitt Andrew Pitt
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: