<p>Im trying to format my yml to be more readable.
I have an if statement that is really long with a bunch of and/ors and I would like to be able to spread it across multiple lines
So something along the lines of</p>
<pre><code>{{-if or
   (eq 'abc' .values.foo)
   (eq 'def' . values.bar)
}}
Def:'works'
{{- end}}
   
</code></pre>
<p>But this throws up errors for incomplete if statement.
Is there some special character or syntax I can use to achieve the above?</p>

Niall
<p>helm supports direct line breaks without special characters.</p>
<p>Missing a space between <code>{{</code> and <code>if</code>.</p>
<p>There is an extra space between <code>.</code> and <code>values</code>.</p>
<p>String constants require double quotes.</p>
<p>demo:</p>
<p>values.yaml</p>
<pre class="lang-yaml prettyprint-override"><code>foo: xxx
bar: yyy
</code></pre>
<p>templates/cm.yaml</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: test
  labels:
    {{- include &quot;test.labels&quot; . | nindent 4 }}
data: 
  cfg: |-
    {{- if or
      (eq &quot;abc&quot; .Values.foo)
      (eq &quot;def&quot; .Values.bar)
    }}
    if
    {{- else }}
    else
    {{- end }}
</code></pre>
<p>cmd</p>
<pre class="lang-bash prettyprint-override"><code>helm template --debug test .
</code></pre>
<p>output</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: test
data: 
  cfg: |-
    else
</code></pre>
