Need configurable namespaces for helm charts #630

Closed
opened 2024-03-17 01:42:42 +00:00 by jessesanford · 1 comment
jessesanford commented 2024-03-17 01:42:42 +00:00 (Migrated from gitea.com)

This is similar to Issue #623 however I actually am happy most of the helm charts don't set the namespace because I am using the helm template command to render the template to yaml before applying it to my clusters via gitops. The helm "template" command does not add the Release.namespace see: https://github.com/helm/helm/issues/3553#issuecomment-1186518158

A fix that could solve both #623 and this would be to allow for all of the templates to use a value which if not present could default to the Release.namespace which in turn defaults to "default" when it's not set.

I like this behavior rather than using a value and setting the default to something like "gitea" because it is backwards compatible with the current behavior in all templates that use Release.namespace currently.

See: https://github.com/helm/helm/issues/3553#issuecomment-1186518158

Something like:

namespace: {{ .Values.namespace | default .Release.Namespace }}

Should work

This is similar to Issue #623 however I actually am happy most of the helm charts don't set the namespace because I am using the helm template command to render the template to yaml before applying it to my clusters via gitops. The helm "template" command does not add the Release.namespace see: https://github.com/helm/helm/issues/3553#issuecomment-1186518158 A fix that could solve both #623 and this would be to allow for all of the templates to use a value which if not present could default to the Release.namespace which in turn defaults to "default" when it's not set. I like this behavior rather than using a value and setting the default to something like "gitea" because it is backwards compatible with the current behavior in all templates that use Release.namespace currently. See: https://github.com/helm/helm/issues/3553#issuecomment-1186518158 Something like: ``` namespace: {{ .Values.namespace | default .Release.Namespace }} ``` Should work
justusbunsi commented 2024-10-08 16:41:04 +00:00 (Migrated from gitea.com)

Resolved by #713

Resolved by #713
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#630
No description provided.