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
Create library chart with some template function there ("test-template-function").
Push this chart to the OCI repo.
Create a new chart ("parent").
Create a subchart there ("child").
Declare a dependency to the library chart from step 2 in this subchart.
Include the library function in this subchart somehow ("{{ include "test-template-function") .}}") .
Publish the parent chart via bundle publish.
Use bundle render to view a chart content.
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.
The text was updated successfully, but these errors were encountered:
С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.
ilya-lesikov
changed the title
Subcharts using oci dependencies do not restore them during bundle publish
Dependencies defined in Chart.yaml files of subcharts are not resolved
Dec 2, 2024
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.
The text was updated successfully, but these errors were encountered: