<p>I'm using <code>helm template</code> command to template a file but cannot escape a space character in yaml sequence. I have tried with <code>""</code> and <code>''</code> but the result remains the same.</p>

<p><strong>template.yaml:</strong></p>

<pre><code>scriptsApproval:
{{ toYaml .Values.scriptApproval }}
</code></pre>

<p><strong>values.yaml:</strong></p>

<pre><code>scriptsApproval:
- string1 abc ijk lmn
- string2 abc ijk lmn
- string3 abc ijk lmn
</code></pre>

<p>Getting Results after running <code>helm template</code></p>

<p><strong>result.yaml:</strong></p>

<pre><code>scriptsApproval:
- string1 abc ijk 
  lmn
- string2 abc ijk 
  lmn
- string3 abc ijk 
  lmn
</code></pre>

U. Ahmad
<p>You can use Helm's <code>|quote</code> function described <a href="https://github.com/helm/helm/blob/master/docs/charts_tips_and_tricks.md#quote-strings-dont-quote-integers" rel="nofollow noreferrer">here</a> and <a href="https://helm.sh/docs/chart_best_practices/#formatting-templates" rel="nofollow noreferrer">here</a></p>

<pre><code>{{ toYaml .Values.scriptApproval }}
</code></pre>

<p>Would be something like</p>

<pre><code>{{ range .Values.scriptApproval }}
{{ . | quote }}
{{ end }}
</code></pre>

<p>*Untested</p>
