Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$ in the context of named templates: #1399

Open
thernstig opened this issue Nov 23, 2022 · 1 comment
Open

$ in the context of named templates: #1399

thernstig opened this issue Nov 23, 2022 · 1 comment

Comments

@thernstig
Copy link

Reference: helm/helm#8702

https://helm.sh/docs/chart_template_guide/variables/ says:

However, there is one variable that is always global - $ - this variable will always point to the root context.

This is misleading, as in effect, the "global scope" is limited to the scope passed to the named template. As @bacongobbler says:

"global scope" is a bit of a misnomer in this case. In actuality, the dollar sign operator refers to the root scope. In a named template, the root scope changes into the form of the input.

It would be good if both https://helm.sh/docs/chart_template_guide/variables/ is updated to mention this, as well as mentioning this important fact in https://helm.sh/docs/chart_template_guide/named_templates/#setting-the-scope-of-a-template.

@th0ger
Copy link

th0ger commented Aug 8, 2024

Spent hours on this misleading docs. Please fix :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants