<p>I try to import a json file into a configmap but the map doesn't contain the file.</p>

<p>my ConfigMap-Template:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: serilog-configmap
data:
  serilog.json: |-
{{ .Files.Get "serilog.json" | indent 4}}
</code></pre>

<p>serilog.json is in the root-path of the Project, there is a sub-dir with the Chart and the templetes ( from helm create ).</p>

<p>I allso tried "../../serilog.json" and the fullpath as the filename but it allways ends with the same result when i run helm install --debug --dry-run.</p>

<pre><code>---
# Source: hellowebapi/templates/serilogConfigMap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: serilog-configmap
data:
  serilog.json: |-
---
</code></pre>

<p>I would excpect:</p>

<pre><code>---
# Source: hellowebapi/templates/serilogConfigMap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: serilog-configmap
data:
  serilog.json: |-
{
    "Serilog": {
        "Using": [
            "Serilog.Sinks.ColoredConsole"
        ],
...
---
</code></pre>

<p>Can anybody tell me where i make my mistake?</p>

<p>Try this :</p>
<pre><code>---
apiVersion: v1
kind: ConfigMap
metadata:
  name: serilog-configmap
data:
  serilog.json: |-
    {{- $.Files.Get &quot;configurations/serilog.json&quot;  | nindent 6 -}}
</code></pre>
<p>with a relative path for the json file (<code>hellowebapi/configurations/serilog.json</code>)</p>
<p>It will produce :</p>
<pre><code>---
# Source: serilog/templates/test.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: serilog-configmap
data:
  serilog.json: |-
      {
          &quot;apiVersion&quot;: &quot;v1&quot;,
          &quot;kind&quot;: &quot;Pod&quot;,
          &quot;metadata&quot;: {
              &quot;annotations&quot;: {
</code></pre>
