You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had expected that helm would "look up" in the directory structure until it finds the "main chart" (that being the chart/directory whose parent-directory does not contain a Chart.yaml) and its values.yaml to provide the global values to the subchart even when running it stand-alone.
"Global values are values that can be accessed from any chart or subchart by exactly the same name"
After reading the comments in helm/helm#4767, i understand why i get an error about .Values.global not being defined when executing only a subchart. I still think it might be good to explicitly state in the template-guide that subcharts using global variables either have to duplicate those in their own values.yaml with default values or cannot be run on their own any longer without explicitly passing the values from the main-chart on the command-line. Perhaps one could explain the explanation with a note that one can install only a specific subchart by declaring it as dependency in the main chart and enabling/disabling it using tags or conditions. As the Topic-Section seemed to be far to "in-depth" for a beginner i started with the templating-guide and its simple(r) examples and read the Topics later.
Kind regards!
The text was updated successfully, but these errors were encountered:
Argelbargel
changed the title
Improve documentation/template-guide about dependencies to global values
Improve documentation/template-guide about dependencies to global values in subcharts
Oct 28, 2022
Hi there,
While following the template-guide i ran in to an error when running my subchart after adding a global value to its template.
I had expected that helm would "look up" in the directory structure until it finds the "main chart" (that being the chart/directory whose parent-directory does not contain a Chart.yaml) and its values.yaml to provide the global values to the subchart even when running it stand-alone.
The section in the template-guide about adding values to subcharts states (https://helm.sh/docs/chart_template_guide/subcharts_and_globals/#adding-values-and-a-template-to-the-subchart)
"Because every subchart is a stand-alone chart, we can test mysubchart on its own"
And the section about global chart values states (https://helm.sh/docs/chart_template_guide/subcharts_and_globals/#global-chart-values):
"Global values are values that can be accessed from any chart or subchart by exactly the same name"
After reading the comments in helm/helm#4767, i understand why i get an error about .Values.global not being defined when executing only a subchart. I still think it might be good to explicitly state in the template-guide that subcharts using global variables either have to duplicate those in their own values.yaml with default values or cannot be run on their own any longer without explicitly passing the values from the main-chart on the command-line. Perhaps one could explain the explanation with a note that one can install only a specific subchart by declaring it as dependency in the main chart and enabling/disabling it using tags or conditions. As the Topic-Section seemed to be far to "in-depth" for a beginner i started with the templating-guide and its simple(r) examples and read the Topics later.
Kind regards!
The text was updated successfully, but these errors were encountered: