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.
Need to be backport to master branch.