How does a parent chart pass values to a subchart?
BeginnerConceptValues & Precedence
Answer
Under a top-level key matching the subchart's name (or its alias):
# parent values.yaml
postgres:
enabled: true
auth:
database: shop
username: shop
persistence:
size: 5Gi
Inside the subchart those appear as .Values.auth.database etc. The parent can read them too (.Values.postgres.auth.database), which is handy for building connection strings.
More on Values & Precedence
What is the precedence order of values in Helm?BeginnerHow are lists merged across values files?IntermediateWhat is the difference between `--set` and `--set-string`?BeginnerHow do you set nested keys, list items and keys containing dots with `--set`?IntermediateWhat are `--set-file`, `--set-json` and `--set-literal` for?IntermediateHow do you remove a default value set in a chart's `values.yaml`?Intermediate