title: helm join list from values file
body: <p>I'm looking for a solution to transform a list in my values.yaml in a comma separated list.</p>
  
  <p>values.yaml</p>
  
  <pre><code>app:
    logfiletoexclude:
      - "/var/log/containers/kube*"
      - "/var/log/containers/tiller*"
  </code></pre>
  
  <p>_helpers.tpl:</p>
  
  <pre><code>{{- define "pathtoexclude" -}}
  {{- join "," .Values.app.logfiletoexclude }}
  {{- end -}}
  </code></pre>
  
  <p>configmap:</p>
  
  <pre><code>&lt;source&gt;
    @type tail
    path /var/log/containers/*.log
    exclude_path [{{ template "pathtoexclude" . }}]
    ...
    ...
  &lt;/source&gt;
  </code></pre>
  
  <p>The problem is there is missing quotes in my result</p>
  
  <pre><code> exclude_path [/var/log/containers/kube*,/var/log/containers/tiller*]
  </code></pre>
  
  <p>How can I fix it to be able to have:</p>
  
  <pre><code>  exclude_path ["/var/log/containers/kube*","/var/log/containers/tiller*"] 
  </code></pre>
  
  <p>I've try with:</p>
  
  <pre><code>{{- join "," .Values.app.logfiletoexclude | quote}}
  </code></pre>
  
  <p>but this give me:</p>
  
  <pre><code>exclude_path ["/var/log/containers/kube*,/var/log/containers/tiller*"] 
  </code></pre>
  
  <p>Thanks</p>