<p>I have to include the client script file as configmap and mount to pod how to create configmap for below structure in values.yaml</p>

<pre><code>app:
  server:
    client-cli1.sh: |
      #!/bin/bash
      echo "Hello World"
    client-cli2.sh: |
      #!/bin/bash
      echo "Hello World"
</code></pre>

<p>this is configmap file</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: cli-config
data: 
{{ range  $key, $val:= .Values.app.server }}
  {{ $key }}: |
    {{ $val  }}
{{ end }}
</code></pre>

<p>i am getting error "error converting YAML to JSON: yaml: line 14: could not find expected ':'"
Note: cant change structure and cant use File function because the build happen somewhere else only values.ymal will be provided.</p>

<p>how to parse this.</p>

user1184777
<p>Try this:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: cli-config
data: 
{{ toYaml .Values.app.server | indent 2 }}
</code></pre>
