<p>I want to set <code>slave.extraVolumes</code> as below. </p>

<pre><code>helm install my-db --set replication.enabled=true,slave.extraVolumes={"db-disk-1","db-disk-2"} bitnami/postgresql -n development
</code></pre>

<p>But it says a error</p>

<pre><code>Error: expected at most two arguments, unexpected arguments: bitnami/postgresql
</code></pre>

<p>Already tested ways:</p>

<pre><code>helm install my-db --set replication.enabled=true,slave.extraVolumes={db-disk-1,db-disk-2} bitnami/postgresql -n development
Error: expected at most two arguments, unexpected arguments: bitnami/postgresql

helm install my-db --set replication.enabled=true,slave.extraVolumes="db-disk-1\,db-disk-2" bitnami/postgresql -n development
Error: YAML parse error on postgresql/templates/statefulset-slaves.yaml: error converting YAML to JSON: yaml: line 115: could not find expected ':'
</code></pre>

Padmasankha
<p>There are (at least) three things going on:</p>

<ul>
<li>the <a href="https://github.com/bitnami/charts/blob/master/bitnami/postgresql/templates/statefulset-slaves.yaml#L271-L273" rel="nofollow noreferrer"><code>slave.extraVolumes</code> is a <strong>list</strong> of <code>Volume</code> structures</a>, so just providing two names won't get it done</li>
<li>you are using characters that are meaningful to the shell without quoting them</li>
<li>but in the end it doesn't matter because you cannot represent complex structures using only <code>--set</code> syntax, you'll need <code>--values</code> with either a file or a <a href="https://www.gnu.org/software/bash/manual/html_node/Process-Substitution.html#Process-Substitution" rel="nofollow noreferrer">process substitution</a></li>
</ul>

<pre class="lang-shell prettyprint-override"><code>helm install my-db \
   --set replication.enabled=true \
   --values &lt;(echo '{
      "slave": {
        "extraVolumes": [
          {
            "name": "db-disk-1",
            "emptyDir": {}
          },
          {
            "name": "db-disk-2",
            "emptyDir": {}
          }
        ]
      }
   }') \
   bitnami/postgresql -n development
</code></pre>
