charts icon indicating copy to clipboard operation
charts copied to clipboard

templates: explicitly set resource namespaces

Open pgier opened this issue 1 year ago • 1 comments

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).

pgier avatar Aug 16 '23 15:08 pgier

Agreed. It seems that has been already used here: https://github.com/chartmuseum/charts/blob/main/src/chartmuseum/templates/servicemonitor.yaml#L6

chrislin22 avatar Aug 16 '23 17:08 chrislin22