kuberneteskubernetes-helm

How to set multiple argument with postgress helm 3.0


I want to set slave.extraVolumes as below.

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

But it says a error

Error: expected at most two arguments, unexpected arguments: bitnami/postgresql

Already tested ways:

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 ':'

Solution

  • There are (at least) three things going on:

    helm install my-db \
       --set replication.enabled=true \
       --values <(echo '{
          "slave": {
            "extraVolumes": [
              {
                "name": "db-disk-1",
                "emptyDir": {}
              },
              {
                "name": "db-disk-2",
                "emptyDir": {}
              }
            ]
          }
       }') \
       bitnami/postgresql -n development