Customising Chart Parameters
Customising Chart Parameters
-
This is done whilst installing a chart .
-
When you install a chart, you also use its default values.
-
The Wordpress chart deploys
values.yamlanddeployment.yaml -
In
deployment.yaml, there is a line calledvalue: {{.Values.wordpressBlogName | quote}}- this is where the value is displayed/- Then under the
values.yamlfile, this haswordpressBlogName: User's Blog!. Changing that will change the layout of the Wordpress website.
- Then under the
-
The
helm install my-release bitnami/wordpresscommand pulls the chart and deploys the application immediately - we cannot change any of it during this time.- To pass in values, can use the
--setoption. You can pass in any field from thevalues.yamlfile, like so:helm install --set wordpressBlogName="Helm Tutorials" my-release bitnami/wordpress -
This can be used multiple times to pass commands into the
helm installcommand. --set wordpressEmail="john@example.com"
- To pass in values, can use the
-
If there are too many values, another option is to move the above
--setcommands to a custom values file. - You would create a
custom-values.yamlfile with these parameters:wordpressBlogName: Helm Tutorials wordpressEmail: john@example.com - Then to use the above file, you run:
helm install --values custom-values.yaml my-release bitnami/wordpres -
What if we want to override the
values.yamlfile itself.-
Use the
helm pullcommand like so: -
helm pull bitnami/wordpress -
This pulls the chart in an archived form.
- Then need to unarchive or uncompress it.
-
helmcan also decompress it usinghelm pull --untar bitnamin/wordpress-
This creates a directory called
wordpressand you can see all of the parts in the chart. -
Can then edit the
values.yamlthat way.
-
-
Then when we want to install the application, we run
helm install my-release ./wordpressat the local directory.
-