Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Helm template - Overriding values file

I am currently trying to test some changes, specifically to see if a chart picks up/inherits changes from a top level values file. This top level values file should override any settings in the values file for this chart. To test this, I am trying to use the following command:

helm template --values path/to/top/level/values.yaml path/to/chart > output.yaml

However, when viewing the output for this, the chart still retains the values defined in the chart, and not the values that have been set in the top level values file.

I have tried a number of variations of this command, such as:

helm template path/to/chart --values path/to/top/level/values.yaml > output.yaml

helm template -f path/to/chart/values.yaml --values path/to/top/level/values.yaml > output.yaml

helm template path/to/top/level/values.yaml --values path/to/chart > output.yaml

Am I using this command correctly? Is what I am trying to achieve only possible when doing a helm install or upgrade? e.g. https://all.docs.genesys.com/PrivateEdition/Current/PEGuide/HelmOverrides

like image 210
HollowDev Avatar asked Nov 04 '25 23:11

HollowDev


1 Answers

Overriding values from a parent (you call it top-level) chart mychart works like a charm and exactly as described in the Helm docs.

A values.yaml in folder mychart/charts/mysubchart

dessert: cake

can be overriden by a values.yaml in folder mychart

mysubchart:
  dessert: ice cream

Any directives inside of the mysubchart section will be sent to the mysubchart chart.

Rendering the parent (top-level) chart works like that:

helm template mychart -f mychart/values.yaml
like image 132
Sascha Gottfried Avatar answered Nov 07 '25 15:11

Sascha Gottfried