<p>I am confused when to use spaces and when not to when it comes to arrays and configs.</p>
<p>I think for single value arrays you need to use spaces:</p>
<p>ie:</p>
<pre><code>values:
  - &quot;hello&quot;
  - &quot;bye&quot;
  - &quot;yes&quot;
</code></pre>
<p>However this is wrong:</p>
<pre><code>spec:
  scaleTargetRef:
    name: sb-testing
  minReplicaCount: 3
  triggers:
    - type: azure-servicebus
    metadata:
      direction: in
</code></pre>
<p>When the values are a map, the helm interpreter complains when I add spaces:
<code>error: error parsing deploy.yaml: error converting YAML to JSON: yaml: line 12: did not find expected '-' indicator</code></p>
<p>Doesn't when I don't:</p>
<pre><code>spec:
  scaleTargetRef:
    name: sb-testing
  minReplicaCount: 3
  triggers:
  - type: azure-servicebus
    metadata:
      direction: in
</code></pre>
<p>I can't seem to find any rules about this.</p>

Teebu
<p>An array of objects in YAML can start with or without spaces. Both are valid in YAML syntax.</p>
<pre class="lang-yaml prettyprint-override"><code>values:
 - &quot;hello&quot;
 - &quot;bye&quot;
 - &quot;yes&quot;
</code></pre>
<pre class="lang-yaml prettyprint-override"><code>values:
- &quot;hello&quot;
- &quot;bye&quot;
- &quot;yes&quot;
</code></pre>
<p>Make sure that the keys of the same block must be in the same column.</p>
<p>Sample:</p>
<pre class="lang-yaml prettyprint-override"><code>spec:
  scaleTargetRef:
    name: sb-testing
  minReplicaCount: 3
  triggers:
    - type: azure-servicebus 
      metadata: # &quot;metadata&quot; and &quot;type&quot; in the same column 
        direction: in
</code></pre>
<p>or</p>
<pre class="lang-yaml prettyprint-override"><code>spec:
  scaleTargetRef:
    name: sb-testing
  minReplicaCount: 3
  triggers:
  - type: azure-servicebus
    metadata:
      direction: in
</code></pre>
