title: helm - how to iterate over map with complex values
body: <p>In a helm chart want to iterate over a map that contains structured values.</p>
  <p>I do know how to iterate over a map with simple string values. I also can iterate over an array that contains structured values (not shown here). But I did not manage to iterate over a map that contains structured values.</p>
  <p>This is my directory structure containing 3 files:</p>
  <pre><code>templates/test.yaml
  Chart.yaml
  values.yaml
  </code></pre>
  <p>A simple file Chart.yaml (just for completing the showcase):</p>
  <pre><code>---
  apiVersion: v1
  appVersion: &quot;1.0&quot;
  description: A Helm chart for Kubernetes
  name: foochart
  version: 0.1.0
  </code></pre>
  <p>The file values.yaml with a map that contains simple string values (label) and one that contains structured values (label1):</p>
  <pre><code>---
  label:
    fook: foo
    bark: bar
  label1:
    fook:
      name: foo
      value: foo1
    bark:
      name: bar
      value: bar2
  </code></pre>
  <p>This template test.yaml works:</p>
  <pre><code>---
  env:
    {{- range $k, $v := .Values.label }}
    - name: {{ $k }}
      value: {{ $v }}
    {{- end }}
  </code></pre>
  <p>But when I substitute <code>.Values.label</code> by <code>.Values.label1</code>, it produces no output.</p>
  <p>This is my command for testing:</p>
  <pre><code>helm template foochart
  </code></pre>
  <p>Question: Is it possible to process a map with structured values? I would like to use something like <code>$v.name</code>. If yes, how can I do that?</p>