Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where to override .Release.Name in helm

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

like image 277
Prateek Jain Avatar asked Nov 23 '18 15:11

Prateek Jain


People also ask

How do you override values in Helm chart?

You can use a --values flag in your Helm commands to override the values in a chart and pass in a new file. Specify the name of the new file after the --values flag in the Helm command. Example: helm upgrade --install <service> -f values.

Where is Helm release information stored?

Release storage changed In Helm 2, releases are stored as ConfigMaps (default) or Secrets in the cluster under the Tiller namespace, kube-system (default). The Helm Release object is stored in the data. release field of the Configmap or Secret as a base-64 encoded, gzipped archive.


1 Answers

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.

like image 93
Ryan Dawson Avatar answered Nov 03 '22 20:11

Ryan Dawson