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
Hi
We have quite a bit of repetition in our templates. To try and reduce this repetition I have been looking at using the Go template function Kudo supports.
I have been able to define and use templates within the same template file e.g.
This helps to reduce some of the repetition within the same template, but ideally I would be able to move the template definitions into a file which can be shared by all template files in the /templates directory in the same way helm uses _helper.tpl.
I have looked through the documentation but I can't see how to create and reference a "helper" file. I have tried referencing the a template in multiple yaml files, but I get an error saying: "... at <{{template "creatorLabel"}}>: template "creatorLabel" not defined".
Is it be possible to create an external template / helper file?
The text was updated successfully, but these errors were encountered:
andylholloway
changed the title
Support external template function
Support for _helper.tpl so Go templates can be shared by all files in templates directory
Feb 14, 2021
Hi
We have quite a bit of repetition in our templates. To try and reduce this repetition I have been looking at using the Go template function Kudo supports.
I have been able to define and use templates within the same template file e.g.
This helps to reduce some of the repetition within the same template, but ideally I would be able to move the template definitions into a file which can be shared by all template files in the
/templates
directory in the same way helm uses_helper.tpl
.I have looked through the documentation but I can't see how to create and reference a "helper" file. I have tried referencing the a template in multiple yaml files, but I get an error saying: "... at <{{template "creatorLabel"}}>: template "creatorLabel" not defined".
Is it be possible to create an external template / helper file?
The text was updated successfully, but these errors were encountered: