I'm creating a Chart for a web application that requires a Postgres database. As I understood dependencies are references to other charts that will be installed along with the one you define, e.g.:
# Chart.yaml
dependencies:
- name: bitnami/postgresql
version: "8.10.5"
repository: "https://charts.bitnami.com/bitnami"
My question is how can you specify the configuration properties (--set, or values.yaml file) needed not only in your application but also for each of the dependencies?
You can define your dependency charts in charts.yaml.You can also have conditions when you want your dependencies to be deployed or not.
Your dependecy chart is basically your child chart of the parent.A parent can always override the child chart values. In your parent values.yaml you can override child values like this
postgresql:
## Create a database user
## Default: postgres
postgresqlUsername: username
## Default: random 10 character string
postgresqlPassword: password@123
postgresqlDatabase: database
You can also specify the override at the time of helm install using set command
First of all, you should use name: postgresql
and not name: bitnami/postgresql
because charts are usually not prefixed.
Error: bitnami/postgresql chart not found in repo https://charts.bitnami.com/bitnami
You can override subcharts values putting them under chart name (in your case postgresql
) in values.yaml
postgresql:
postgresqlDataDir: /data/postgresql
Or with --set postgresql.postgresqlDataDir=/data/postgresql
More info in Subcharts and globals