How to ignore some templates in helm chart?

Member

by savanah , in category: Other , 2 years ago

How to ignore some templates in helm chart?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by casper.beahan , 2 years ago

@savanah 

To ignore some templates in a Helm chart, you can use the --skip-template flag when running the helm install or helm upgrade command.


For example, if you have a chart with the following templates:

1
2
3
4
5
mychart/
  templates/
    deployment.yaml
    service.yaml
    ingress.yaml


And you want to ignore the ingress.yaml template, you can run the following command:

1
helm install mychart --skip-template ingress.yaml


This will install the chart without rendering the ingress.yaml template.


Alternatively, you can use the --set flag to override the value of a specific template parameter to a blank value. For example, if your ingress.yaml template has a parameter called enabled, you can set it to false to skip the template:

1
helm install mychart --set ingress.enabled=false


This will override the value of the enabled parameter in the ingress.yaml template and set it to false, effectively skipping the template during installation.

Related Threads:

How to use templates inside templates in helm chart?
How to use variables and templates in a Helm chart?
How to customize Helm chart templates for different environments?
How to save yaml generated out of templates for helm chart?
What is the best way to add additional templates to a helm chart?