title: How can I pass imagePullSecrets, as it is defined in the default template, to helm via set commands
body: <p>When you run <code>helm create mychart</code> it has imagePullSecrets defined like this:</p>
  <pre><code>spec:
    {{- with .Values.imagePullSecrets }}
    imagePullSecrets:
      {{- toYaml . | nindent 8 }}
    {{- end }
  </code></pre>
  <p>In default values file it looks like it's passing it a blank array:</p>
  <pre><code>imagePullSecrets: []
  </code></pre>
  <p>I already have a bunch of charts built from this default template that have this setting. Previously I didn't need to use imagePullSecrets so I just left it as is, but now I have some cases where I want to set this at deploy time via the cli.</p>
  <p>Helm supports arrays now but this doesn't seem to work:</p>
  <pre><code>--set &quot;mychart.imagePullSecrets[0].name={reg-creds}&quot;
  </code></pre>
  <p>Returns:</p>
  <pre><code>Error: UPGRADE FAILED: error validating &quot;&quot;: error validating data: ValidationError(Deployment.spec.template.spec.imagePullSecrets[0].name): invalid type for io.k8s.api.core.v1.LocalObjectReference.name: got &quot;array&quot;, expected &quot;string&quot;
  </code></pre>
  <p>Then I tried passing a string:</p>
  <p><code>--set &quot;mychart.imagePullSecrets='- name: reg-creds'&quot; </code></p>
  <pre><code>Error: unable to build kubernetes objects from release manifest: error validating &quot;&quot;: error validating data: ValidationError(Deployment.spec.template.spec.imagePullSecrets): invalid type for io.k8s.api.core.v1.PodSpec.imagePullSecrets: got &quot;string&quot;, expected &quot;array&quot;
  </code></pre>
  <p>These error messages are infuriating. Is it possible to set this value with <code>--set</code> so I can avoid refactoring all my charts?</p>