title: helm template check for empty string
body: <p>I have been asked to modify a Helm template to accommodate a few changes to check if a value is empty or not as in the code snippet below. I need to check <code>$var.alias</code> inside the <code>printf</code> in the code snippet and write custom logic to print a custom value. Any pointers around the same would be great.</p>
  <pre><code>{{- range $key, $value := .Values.testsConfig.keyVaults -}}
  {{- range $secret, $var := $value.secrets -}}
  {{- if nil $var.alias}}
  {{- end -}}
  {{ $args = append $args (printf &quot;%s=/mnt/secrets/%s/%s&quot; $var.alias $key $var.name | quote) }}
  {{- end -}}
  {{- end -}}
  </code></pre>