Open juanmatias opened 3 months ago
Have you configured two unique instance label keys for each instance, as described here?
@jannfis thanks, it worked! I guess this issue can be closed.
I am documenting this (and the process of deploying two or more ArgoCD instances in the same cluster) here. I am adding a note on this label here.
Please, let me know if we can collaborate with some documentation on this topic in the ArgoCD project.
Checklist:
argocd version
.Describe the bug
Given a shared K8s cluster with two ArgoCD instances:
Each instance in different namespaces:
argocd-devstg
andargocd-production
.Both ArgoCD instances were installed using binbash Leverage, (based on this file), in the end using Terraform, Helm provider, with this info:
There is an Application called "applications" which is deployed to both environments, for devstg:
For productions is the same but changing the namespace to
argocd-production
and the path tokubernetes/charts/applications-production
.Note these applications deploy other apps to the same namespace in which they were created since we are following the Apps-of-Apps approach.
So, when I deploy the "applications" Applications to
argocd-devstg
, only the devstg ArgoCD instance picks it up.But then, when I deploy the app to the
argocd-production
, and the production ArgoCD picks it up, the definitions in both apps are mixed and both ArgoCD instances start fighting trying to reach the app state of each one.I was digging into the code and it seems to be that, when ArgoCD selects the Applications to manage, it checks the namespace in which the app lives is allowed to the instance. But it is as if after both instances pick the apps, the definitions are mixed and both ArgoCD instances start trying to change the same App.
To Reproduce
I tested this with two examples got from ArgoCD.
For this, I used from this repo
https://github.com/argoproj/argocd-example-apps
the exampleskustomize-guestbook
andguestbook
.Steps are:
argocd-devstg
andargocd-production
) using Helm with the given versions.Expected behavior
Given two different ArgoCD instances, they can manage two different Apps with the same name but with different resources being deployed to different target namespaces.
Screenshots
No screenshot. Is ArgoCD trying to create the resources it has defined and trying to delete the resources the other ArgoCD instance is trying to create. I can make a short video if it is useful.
Version
Logs
Didn´t find relevant logs.