Hi, Let us understand how to change the default value from the values.yaml file when the release is
getting released. Let's use the same example.
I do have the values YAML file.
Let me go ahead and do a dry run, and I want to replace the cost code with some other value, so I can
use the set flag helm install dry run
I want to run it in the debug mode and I'm going to set the key cost code to this specific value and
the name of the release is and the chart resources to use from this specific folder.
So what's going to do when the template is getting generated
The value will be computed from the values.yaml file.
And if any value is set within the command prompt, the set is going to get more precedence
So what will happen, the value provided over here will be replaced within the computed values file.
And that will be replaced within the templates.
So this is what the computed value.
The reason, because the user supplied this specific value using this set command.
And it got replaced. This is the final computed value.
And the same would get replaced. Many times
I may want to do a release with some custom value, and I don't want to use that default value, for that
particular purpose I can use this specific set and doing the installation also
I can use the set. Let me go ahead and do a small demo helm install
Name of the release and then release resources.
Then --set key and the value that I want to replace with.
It is done. Let me go ahead and get the manifest using the release name.
helm get manifest and the name of the release valueseteg, so here its
Using the new value that we provided as a part of the command prompt.
And this would have done a deployment of a config maps so I can check the value of the config map as
well within the config map
Also, I do have the value that I passed along with the command prompt, so I can change the value thats provided
as a part of the values YAML file as well during the deployment.
This I will be using it whenever I wanted to do any custom deployment and change the value only
for that specific release.
Let me go ahead and delete this release helm uninstall name of the release
So in a quick summary we have seen how to use the set flag as a part of the command prompt to change the
values provided by the values yaml file.