-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Description
When deploying the Windmill Helm chart using Kustomize's HelmCharts feature within an Argo CD app of apps pattern, all resources are being created in the ArgoCD namespace instead of the intended namespace specified in the Kustomization file.
Current Setup and Behavior
I have an app of apps setup with ApplicationSet and AppProject:
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: tools
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/gabrielcosi/homelab
revision: HEAD
directories:
- path: kubernetes/apps/tools/*
template:
metadata:
name: "{{ path.basename }}"
spec:
project: tools
source:
plugin:
name: kustomize-build-with-helm
destination:
name: in-cluster
namespace: argocd # This seems to override the namespace specified in KustomizationInside one of the tool directories, I have a Kustomization using HelmCharts:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ns.yaml
- cnpg-db.yaml
- http-route.yaml
- db-credentials.yaml
helmCharts:
- name: windmill
repo: https://windmill-labs.github.io/windmill-helm-charts/
version: 2.0.384
releaseName: windmill
namespace: windmill
valuesFile: values.yamlThe issue appears to be a combination of:
- The ApplicationSet template specifying namespace: argocd
- The Helm chart templates not explicitly handling namespace inheritance
- Kustomize's HelmCharts namespace specification not being respected in this setup
Expected Behavior
Resources should be deployed to the namespace specified in the Kustomization file's HelmCharts section (windmill in this case), regardless of the ApplicationSet's destination namespace.
Suggested Fix
Add namespace templating to the Helm chart templates, for example:
metadata:
namespace: {{ .Release.Namespace }}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels