Open eranreshef-starkware opened 2 months ago
ArgoCD creates a service account argocd-manager
in the target destination when a new cluster is added. The simplest option would be to add an annotation to this service account whent its being created. We can capture the details of argocd server and its initial version probably to begin with. Another option would be to use a new configmap, like argocd-server-info
or something similar to capture these details. Can a cluster be added to multiple argocd servers ?
After discussing with @jannfis,
managedFields
section of metadata.I think this can be a configuration in the argo cd configMap so we can provide the InstanceId
. If specified, it will add an annotation argocd.argoproj.io/instance-id: <InstanceId>
to each resources (along with the tracking annotation/labels).
IMO, it is not necessary to have the annotation key configurable, and should be defined statically as AnnotationKeyArgoInstance = "argocd.argoproj.io/instance-id"
.
Having it configured multiple ways, either with different annotations or managedFields makes it unnecessary complex to find the information.
Summary
Clusters/namespaces which are managed by a certain argocd server will (optionally) contain info regarding the server which manages them.
Motivation
A few days ago I needed to troubleshoot some problem I had in a certain namespace which is managed by an argocd instance which exist in a different cluster. Since I have multiple argocd instances, each responsible for different clusters, I tried to find info inside the cluster regarding which argocd instance is responsible for it. Unfortunately, I didn't find any references inside my target cluster.
Proposal
I suggest to add an optional flag which if is enabled will cause the argocd instance to inject some configmap/labels or other way of pointing to the argocd server which manages the relevant resource(s).