title: helm to create single configmap with different labels
body: <p>can anyone help me creating configmaps in helm with different labels.
  I have 6 configmaps each have their own labels which will be used by pods. I would like to have the same labels in helm as well. Is it possible in Helm?</p>
  <p>These are my values for configmap. I want to render these values and create separate configmap.</p>
  <pre><code>values.yaml/   
  configmaptestingforhelm:
    configmapref1:
          confname: serviceaccount-config
          key: serviceaccount.test.path
          value: /root/test_key.json
    configmapref2:
          confname: host-credentials-config
          key: secret.credentials.host.path
          value: /root/host_key.json
  </code></pre>
  <p>I am trying to create separate configmap for each configmappref* as below</p>
  <pre><code>configmap1
  apiVersion: v1
  kind: ConfigMap
  {{- range $value := .Values.configmap.configmapref1 }}
  metadata:
    name: {{ $value.confname }}
  data:
    {{ $value.key }} : {{ $value.value }}
  {{- end}}
  
  configmap2
  apiVersion: v1
  kind: ConfigMap
  {{- range $value := .Values.configmap.configmapref2 }}
  metadata:
    name: {{ $value.confname }}
  data:
    {{ $value.key }} : {{ $value.value }}
  {{- end}}
  </code></pre>
  <p>My expected output is as below ,but I am not getting the desired output</p>
  <pre><code>apiVersion: v1
  data:
    secret.credentials.host.path: /root/host_key.json
  kind: ConfigMap
  metadata:
    name: host-credentials-config
  
  apiVersion: v1
  data:
    serviceaccount.test.path: /root/test_key.json
  kind: ConfigMap
  metadata:
    name: serviceaccount-config
  </code></pre>