<p>I'm using a configmap with a dynamic filename defined as below. However, after I do helm template the value for the filename is empty:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: krb5-configmap
data:
  krb5.conf: |-
      {{ .Files.Get (printf "%s//krb5-%s.conf" .Values.kerberosConfigDirectory .Values.environment) | indent 4 }}</code></pre>
</div>
</div>
</p>
<blockquote>
<p>kerberosConfigDirectory: kerberos-configs (set in Values.yaml)</p>
</blockquote>
<blockquote>
<p>Folder structure:</p>
</blockquote>
<p>k8s:</p>
<ul>
<li>templates
<ul>
<li>configmap.yaml</li>
</ul>
</li>
<li>kerberos-configs
<ul>
<li>krb5-dev.conf</li>
</ul>
</li>
</ul>
<blockquote>
<p>After helm template the data value looks like this:</p>
</blockquote>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>data:
  krb5.conf: |-
--</code></pre>
</div>
</div>
</p>
<p>I can't figure out why the value for the filename is empty. Note that I'm able to run the helm template command successfully.</p>

<p>You have an extra <code>/</code> and extra <code>    </code> indentation in you file. Working example:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: krb5-configmap
data:
  krb5.conf: |-
{{ .Files.Get (printf &quot;%s/krb5-%s.conf&quot; .Values.kerberosConfigDirectory .Values.environment) | indent 4 }}
</code></pre>
