argoproj / argo-helm

ArgoProj Helm Charts
https://argoproj.github.io/argo-helm/
Apache License 2.0
1.72k stars 1.86k forks source link

Secret "argocd-secret" in namespace "argocd" exists and cannot be imported into the current release #2782

Closed unique-dominik closed 1 month ago

unique-dominik commented 4 months ago

Describe the bug

Hi all,

It is not really a bug but I still struggle to find an elegant solution for the following problem and I am sure I just miss a point in the documentations somewhere 🤯

We use helmfile to deploy our apps. So I would also like to use it to deploy Argo.

But I struggle with this plain install:

repositories:
  - name: argo
    url: https://argoproj.github.io/argo-helm
  - name: bedag
    url: https://bedag.github.io/helm-charts    

releases:
  - name: argocd-configmaps
    chart: bedag/raw
    createNamespace: true
    namespace: argocd
    version: 2.0.0
    wait: false
    values:
      - resources:
          - apiVersion: v1
            kind: ConfigMap
            metadata:
              name: argocd-cmd-params-cm
              labels:
                app.kubernetes.io/name: argocd-cmd-params-cm
                app.kubernetes.io/part-of: argocd
            data:
              # config map values

  - name: argocd
    namespace: argocd
    createNamespace: true
    chart: argo/argo-cd
    version: 7.1.4
    wait: false
    values:
      - configs:
          params:
            create: false

The error naturally is:

Error: Unable to continue with install: ConfigMap "argocd-cmd-params-cm" in namespace "argocd" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "argocd": current value is "argocd-configmaps"

That is clear, the release names per se are different. Can't I tell the Argo Chart where to look for these config maps? I mean they are in the same namespace as the docs say.

Thank you for pointers.

Related helm chart

argo-cd

Helm chart version

7.1.4

To Reproduce

Take an empty chart. Use helmfile. Add a ConfigMap as 1 release and argocd as another.

Expected behavior

I'd expect I can set somewhere that it should not also verify the release name. Most people that create the ConfigMaps separate from the ArgoCD might use another release name no?

Screenshots

No response

Additional context

No response

mkilchhofer commented 3 months ago

Hi @unique-dominik

Could you manage it to work?

I think your Issue title is misleading since you reference a "Secret" and then you talk about a ConfigMap.

unique-dominik commented 3 months ago

Hi.

Sadly I did not. And it doesn't work for either. Not CM or Secret. The error is the same 😢

I made it work by using the inbuilt stuff but I am a bit sad that this nice "feature" does not work as I would do it.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.