71

I have created basic helm template using helm create command. While checking the template for Ingress its adding the string RELEASE-NAME and appname like this RELEASE-NAME-microapp

How can I change .Release.Name value?

helm template --kube-version 1.11.1  microapp/

# Source: microapp/templates/ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: RELEASE-NAME-microapp
  labels:
    app: microapp
    chart: microapp-0.1.0
    release: RELEASE-NAME
    heritage: Tiller
  annotations:
    kubernetes.io/ingress.class: nginx

2 Answers 2

107

This depends on what version of Helm you have; helm version can tell you this.

In Helm version 2, it's the value of the helm install --name parameter, or absent this, a name Helm chooses itself. If you're checking what might be generated via helm template that also takes a --name parameter.

In Helm version 3, it's the first parameter to the helm install command. Helm won't generate a name automatically unless you explicitly ask it to helm install --generate-name. helm template also takes the same options.

Also, in helm 3, if you want to specify a name explicitly, you should use the --name-template flag. e.g. helm template --name-template=dummy in order to use the name dummy instead of RELEASE-NAME

3
  • 3
    Worth mentioning that in helm 3 it no longer autogenerates name for you and you should instead use --generate-name flag if you want a randomly generated name.
    – Vitali
    Nov 20, 2019 at 12:26
  • 21
    Also, in helm 3, if you want to specify a name explicitly, you should use the --name-template flag. e.g. helm template --name-template=dummy in order to use the name dummy instead of RELEASE-NAME
    – Agrim
    Nov 26, 2019 at 10:47
  • I've updated this answer to take these into account, thanks!
    – David Maze
    Dec 24, 2019 at 13:35
3

As of helm 3.9 the flag is --release-name, making the command: helm template --release-name <release name>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.