where to override .Release.Name in helm

11/23/2018

I created a helm chart which is deriving value of app.kubernetes.io/instance from a template value like this:

labels:
    app.kubernetes.io/name: {{ include "mychart.name" . }}
    helm.sh/chart: {{ include "mychart.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}

I don't know in which file and how to override its value. I don't want to override it by command line as described at Helm how to define .Release.Name value

-- Prateek Jain
kubernetes
kubernetes-helm

1 Answer

11/28/2018

The intention is that you don't set the .Release.Name within the helm chart. It is either set to an automatically generated value by helm when the user runs helm install or is set by the user as a parameter with helm install --name. Imagine if the chart were to set the value of .Release.Name - the user would still be able to set a different value for it with helm install --name and there would then be a conflict where it wouldn't be clear which name would be used.

-- Ryan Dawson
Source: StackOverflow