loki icon indicating copy to clipboard operation
loki copied to clipboard

Helm chart should template namespace

Open ashlineldridge opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. Yes, same as this issue for the agent operator, it would be nice if the chart templated the namespace associated with namespaced resources - e.g. like the tempo chart does.

metadata:
  namespace: {{ .Release.Namespace }}

Currently it doesn't which means that running helm template --namespace does not have the effect of producing correctly namespaced resources. This makes setting up GitOps repositories more cumbersome.

Describe the solution you'd like Namespaced resources and references to them should use the {{ .Release.Namespace }} syntax.

Describe alternatives you've considered Running kustomize over the templated output to patch the namespace in.

Additional context No.

ashlineldridge avatar Jan 05 '23 10:01 ashlineldridge

Would be nice to use {{ default .Values.namespace .Release.Namespace }} instead! Want to be able to deploy it to a different namespace...

lucasoares avatar Feb 15 '24 16:02 lucasoares

@ashlineldridge or @lucasoares would you propose the change in a PR? I think it's reasonable but we won't have the time to work on it.

jeschkies avatar Feb 19 '24 15:02 jeschkies

@ashlineldridge after this PR: https://github.com/grafana/loki/pull/9330 loki already uses Namespace throughout the entire helm chart.. I think my needs is different, since I need to have a namespaceOverride value to be able to override the default namespace... I will create a PR with this.

lucasoares avatar Feb 19 '24 17:02 lucasoares

@ashlineldridge or @lucasoares would you propose the change in a PR? I think it's reasonable but we won't have the time to work on it.

May you please feedback me on the PR I just created?

lucasoares avatar Feb 19 '24 18:02 lucasoares