<p>With Kubernetes 1.10.* we can use <code>binaryData:</code> with <code>ConfigMap</code> and I am trying to combine it with <code>Helm</code>:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: some_config_map
data:
  text_data: |-
    {{ .Files.Get "truststores/simple_text_file.txt" }}
binaryData:
  trustore.jks: |-
    {{ .Files.Get "truststores/trustore.jks" | b64enc }}
</code></pre>

<p>I am not sure about the last line - regardless of syntax:</p>

<pre><code> {{ "truststores/trustore.jks" | b64enc }}
 {{ "truststores/trustore.jks" }}
</code></pre>

<p>the <code>trustore.jks</code> is empty when I deploy it.</p>

<p>So how can I use <code>binaryData:</code> ?</p>

pb100
<p>Your syntax looks fine and everything should work properly. Files in the field  <code>binaryData</code> must be encoded with base64, so, <code>{{ .Files.Get "truststores/trustore.jks" | b64enc }}</code> is correct.</p>

<p>Try to apply the configuration with debug key and investigate what went wrong, possibly there is no such file or there are some problems with encoding.</p>
