I want to use the postgresql chart as a requirements for my Helm chart.
My requirements.yaml
file hence looks like this:
dependencies: - name: "postgresql" version: "3.10.0" repository: "@stable"
In the postgreSQL Helm chart I now want to set the username with the property postgresqlUsername
(see https://github.com/helm/charts/tree/master/stable/postgresql for all properties).
Where do I have to specify this property in my project so that it gets propagated to the postgreSQL dependency?
There are two ways to pass configuration data during install: --values (or -f ): Specify a YAML file with overrides. This can be specified multiple times and the rightmost file will take precedence. --set name=value : Specify overrides on the command line.
In Helm, one chart may depend on any number of other charts. These dependencies can be dynamically linked through the requirements. yaml file or brought in to the charts/ directory and managed manually.
As described in https://v2.helm.sh/docs/chart_template_guide/#subcharts-and-global-values, in your parent (i.e. not the dependency) chart's values.yaml
file, have a section that contains
postgresql: postgresUsername: .... postgresPassword: .... ...
That is, all values under the postgresql
key will override the child (postgresql
) chart's values.yaml
values. Note that if you have aliased the postgresql
dependency chart to another name in your requirements.yaml
, you should use that other name instead of postgresql
.
edit: The corresponding article in v3 is here https://helm.sh/docs/chart_template_guide/subcharts_and_globals/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With