Open kayanme opened 2 months ago
Сhart dependency resolution in Helm is very primitive. As far as I remember it only downloads direct dependencies of the root chart, but unable to resolve and download subchart dependencies. So you either vendor your whole charts tree in .helm/charts
or define a complete list of charts needed to be downloaded in .helm/Chart.yaml
.
You can add the subchart dependency to the parent chart, then the function will be available to use in the subchart, but only in one. Other subcharts with this dependency will not be rendered at all.
That's not how it should work. This is a bug or, most likely, misconfiguration. Helm templates (define/include templates in .tpl files) are globally scoped. Once a chart with such .tpl templates included once, all of these templates become available to all the other charts, be it parent or child or sibling charts. Make sure you do everything correctly and if the issue stays please provide a reproducible example.
Before proceeding
Version
2.10.5
How to reproduce
Instead of 7 and 8 you can just render chart or just converge it, the result will be the same (no function found).
Result
Error: error constructing chart tree: error rendering resources for chart "parent": template: parent/charts/child/templates/function-call.yaml:1:4: executing "parent/charts/child/templates/function-call.yaml" at <include "test-template-function" . >: error calling include: template: no template "test-template-function" associated with template "gotpl"
Expected result
The function from the subchart dependency should be seen.
Additional information
You can add the subchart dependency to the parent chart, then the function will be available to use in the subchart, but only in one. Other subcharts with this dependency will not be rendered at all.