title: adding yaml array as env to kubernetes/kustomize
body: <p>So, I have a yaml file that looks like this: </p>
  
  <pre><code>service:
          users:
              - username: some-user
                password: some-pass (would be placed in Secret)
              - username: some-user
                password: some-pass (would be placed in Secret)
  </code></pre>
  
  <p>I need to add it in env (In spring boot's priority list, config from env is higher than config from yaml. And this would be env(dev,stage,live) based). 
  I already tried this with Kustomize</p>
  
  <pre><code>configMapGenerator:
      - name: my-java-server-props
        files:
        - config.yaml
  </code></pre>
  
  <p>And then using this in Deployment </p>
  
  <pre><code>envFrom:
    - configMapRef:
        name: my-java-server-props
  </code></pre>
  
  <p>Other configs in config.yml like this: </p>
  
  <pre><code>spring:
    datasource:
      url: some-url-here
  </code></pre>
  
  <p>are then add in .properties file for configMapGenerator like this:</p>
  
  <pre><code>spring_datasource_url=some-url-here
  </code></pre>
  
  <p>but the config with array doesn't seem to work. </p>
  
  <p>any hints on where am I missing the trick? 
  Also, the password comes from credstash; so, I have a different script which gets the value from credstash and creates a manifest for Secret. </p>
  
  <p>The end goal to add passwords would be something like this in Deployment: </p>
  
  <pre><code>name: service_users.0.password
        valueFrom:
          secretKeyRef:
            key: value
            name: service-user-store-password
  </code></pre>