<p>In values.yaml I have defined</p>
<pre><code>data_fusion:
    tags:
      - tag1
      - tag2
      - tag3
    instances:
      - name: test
        location: us-west1
        creating_cron: @once
        removing_cron: @once
        config:
          type: Developer
          displayName: test
          dataprocServiceAccount: 'my@project.iam.gserviceaccount.com'
        pipelines:
          - name: test_rep
            pipeline: '{&quot;my_json&quot;:{}}'
      - name: test222
        location: us-west1
        creating_cron: @once
        removing_cron: @once
        config:
          type: Basic
          displayName: test222
          dataprocServiceAccount: 'my222@project.iam.gserviceaccount.com'
        pipelines:
          - name: test_rep222
            pipeline: '{&quot;my_json222&quot;:{}}'
          - name: test_rep333
            pipeline: '{&quot;my_json333&quot;:{}}'
          - name: test_rep444
            pipeline: '{&quot;my_json444&quot;:{}}'
</code></pre>
<p>You guys can see I have 3 tags and 2 instances. The first instance contains 1 pipeline, the second instance contains 3 pipelines.</p>
<p>I want to pass tags and instances to my yaml file:</p>
<pre><code>another_config: {{ .Values.blabla.blablabla }}
data_fusion:
    tags:
      - array of tags should be here
    instances:
      - array of instances (and associated pipelines) should be here
</code></pre>
<p>Or just simply</p>
<pre><code>another_config: {{ .Values.blabla.blablabla }}
data_fusion:
    {{.Whole.things.should.be.here}}
</code></pre>
<p>Could you guys please help? Since I'm new to helm so I don't know how to pass the complicated array (or the whole big section of yaml).</p>

SoT
<p>Helm includes an underdocumented <code>toYaml</code> function that converts an arbitrary object to YAML syntax.  Since YAML is whitespace-sensitive, it's useful to note that <code>toYaml</code>'s output starts at the first column and ends with a newline.  You can combine this with the <code>indent</code> function to make the output appear at the correct indentation.</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
type: ConfigMap
metadata: { ... }
data:
  data_fusion: |-
{{ .Values.data_fusion | toYaml | indent 4 }}
</code></pre>
<p>Note that the last line includes <code>indent 4</code> to indent the resulting YAML block (two spaces more than the previous line), and that there is no white space before the template invocation.</p>
<p>In this example I've included the content as a YAML block scalar (the <code>|-</code> on the second-to-last line) inside a ConfigMap, but you can use this same technique anywhere you've configured complex settings in Helm values, even if it's Kubernetes settings for things like resource constraints or ingress paths.</p>
