argocd-example-apps icon indicating copy to clipboard operation
argocd-example-apps copied to clipboard

ArgoCD app with kustomize helm - helm resources deploy to default namespace

Open bruno-villa opened this issue 2 years ago • 1 comments

This is with ArgoCD v2.4.2 with --enable-helm for the kustomize renderer.

With a kustomization containing a chart, e.g.

helmCharts:
- name: mychart
  version: 1.0.0
  repo: https://my.repo
  releaseName: myrelease
  includeCRDs: false
  valuesInline: {}

resources:
  - myresources.yaml

and an app

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
  namespace: argocd
spec:
  destination:
    namespace: mynamespace
  ...

the result is that resources in myresources.yaml end up in the mynamespace namespace, but resources from mychart end up in the default namespace. This can be solved by explicitly adding the namespace specification to the kustomization. However, this reduces the reusability and can be a source of confusion with two places to specify the namespace. I could not find an existing issue describing this.

bruno-villa avatar Jan 20 '23 09:01 bruno-villa

Having the same issue, thanks for the workaround

Gatschknoedel avatar May 31 '23 07:05 Gatschknoedel