charts
charts copied to clipboard
templates: explicitly set resource namespaces
We have a use case where we are generating manifests using helm template
and then using kubectl apply
to add them to the cluster. We can't use kubectl apply --namespace foo
because helm template is generating resources for multiple namespaces, so the namespaces need to be set explicitly in the charts. This seems to be a common practice among other popular Helm charts (cert-manager, kube-prometheus-stack, etc).
Agreed. It seems that has been already used here: https://github.com/chartmuseum/charts/blob/main/src/chartmuseum/templates/servicemonitor.yaml#L6