Overriding Helm chart values
Contents
Override values passed into the Helm chart through the Values.yaml file.
The values.yaml file
- Service-specific parameters and environment variables are stored in ConfigMaps. Each service guide has more information pertaining to its ConfigMaps.
Overriding values
Default values are specified for most settings in a values.yaml file and these values are passed into the chart. For an initial deployment, if you want to change any of the values, you can do so by directly editing the values.yaml file using a plain text editor.
Apart from editing the YAML file directly, there are two methods you can use to override the values that are being passed into the chart from the values.yaml file. The two methods are as follows:
Using the --set flag
You can use a --set flag in your Helm commands to override the value of a setting in the YAML file. Specify the name of the setting and its new value after the --set flag in the Helm command.
Examples:
- If you want to override the deployment strategy specified for a service during installation, you can use the Helm upgrade command with a --setflag as follows:
 helm upgrade --install <service>-green -f <service>-values.yaml <service>-100.0.112+xxxx.tgz --set <service>.deployment.strategy=blue-green
 The--setflag in the above command overrides the value for the<service>.deployment.strategysetting in the values.yaml file and sets it toblue-green. So, irrespective of the value in the file for this particular setting, the service is installed using theblue-greenstrategy.
- If you want to override the version of the service to install during initial deployment, you can use the Helm upgrade command as follows:
 helm upgrade --install <service> -f <service>-values.yaml <service>-100.0.112+xxxx.tgz --set <service>.image.tag=9.0.1xx.xx.xx
 The--setflag in the above command overrides the image tag version in the values.yaml file and provides a new version.
Using the --values flag
You can use a --values flag in your Helm commands to override the values in a chart and pass in a new file. Specify the name of the new file after the --values flag in the Helm command.
Example:
- helm upgrade --install <service> -f values.yaml <service>-9.0.xx.tgz --values <new file name>.yamlThe- --valuesflag in the above command is passing on a new file with values to override the values in the chart.
