What is the difference between helm syntax {{ something }} and {{- something }}?

The Helm template syntax is based on the Go programming language’s text/template package. The braces {{ and }} are the opening and closing brackets to enter and exit template logic. The Helm documentation at https://helm.sh/docs/chart_template_guide/control_structures/ discusses why this syntax is needed in an example. YAML ascribes meaning to whitespace, so managing the whitespace becomes pretty … Read more

What is the difference between fullnameOverride and nameOverride in Helm?

nameOverride replaces the name of the chart in the Chart.yaml file, when this is used to construct Kubernetes object names. fullnameOverride completely replaces the generated name. These come from the template provided by Helm for new charts. A typical object in the templates is named name: {{ include “<CHARTNAME>.fullname” . }} If you install a … Read more

Helm upgrade fails with error: expects ” or n, but found t

I ran into a similar problem and apparently it turns out Kubernetes’s Pod specification requires environment variable values to be coerced as strings, so integers need to be passed through quote.So, in your deployment.yaml file wherever you are using the numeric values try to pass them as below. value: {{ .Values.environment.TEMP | quote}} It will … Read more

How to set a different namespace for child helm charts?

Update 2: Helm 3 added support for multi namespaces https://github.com/helm/helm/issues/2060 Update 1: If a resource template specifies a metadata.namespace, then it will be installed in that namespace. For example, if I have a pod with metadata.namespace: x and I run helm install mychart –namespace y, that pod will be installed in x. I guess you … Read more

ingress.yaml template returns error in renderring –> nil pointer evaluating interface {}.service

What you’re seeing is a weird caveat in Go templating. Your conditional logic is being evaluated inside a range loop. This means . you’re using to access Values is not the one you expect it to be, as it’s overridden for each range iteration evaluation. You can use $, which references the global scope in … Read more