argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
18.07k stars 5.53k forks source link

Metadata.name changed in for all Kubernetes components in apps of apps #18010

Open lakshmipasala opened 7 months ago

lakshmipasala commented 7 months ago

we are using Argocd(tools) to deploy argocd and other components on multiple k8s clusters using apps of apps. I have upgraded argocd from 2.5.2 to 2.82, after upgraded, all the Argocd's metadata.name, app.kubernetes.io/instance in apps of apps got changed from "argocd" to "cluster1-argocd", due that application is creating new deployments, svc, sts etc with new names and ready to delete old deployment if prune it. Can you please suggest here..

apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: name: argocd-appset spec: syncPolicy: preserveResourcesOnDeletion: true generators:

rumstead commented 7 months ago

Your appset is templating out the name to be name: '{{cluster.name}}-argocd'.

lakshmipasala commented 7 months ago

But same thing was not happening on privious version

rumstead commented 7 months ago

I am having a hard time following. Can you describe how you upgraded Argo CD? Argo CD isn't going to change any of your existing ApplicationSets, if your metadata.name was "argocd" before something changed it to {{cluster.name}}-argocd which will delete and create your applicationsets and possibility your applications.

lakshmipasala commented 6 months ago

Let me describe more here...

  1. I have deployed argocd on every k8s cluster using apps of apps from ARGOCD(ex: tools) - upgraded argocds to 2.8.2 from same tools argocd only --> no issues observed.
  2. I have deployed tools argocd using helm charts manually, and tried to upgrade it 2.8.2 manually, then we are facing issue on all argocds which deployed using apps of apps.

metadata.name, app.kubernetes.io/instance are getting changed to clustername-argocd

lakshmipasala commented 5 months ago

Can somebody suggest on this ?

andrii-korotkov-verkada commented 3 weeks ago

What's your argocd version?