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

Error generating gotemplates for chart /helm: template: /helm:190: function "toYaml" not defined #108

Closed
mcbenjemaa opened this issue Aug 25, 2021 · 4 comments

Comments

@mcbenjemaa
Copy link

I'm generating my README from README.md.gotmpl

I'm setting this inside the README.md.gotmpl

    {{- .Values.container..resources | toYaml | nindent 4 }}

but, it's complaining with the following error

 Error generating gotemplates for chart /helm: template: /helm:190: function "toYaml" not defined 
@reitermarkus
Copy link

reitermarkus commented Jan 9, 2022

I'm getting a similar error:

Error generating gotemplates for chart /{{chart}}: template: /{{chart}}:120: function "fromYaml" not defined

@sc250024
Copy link
Contributor

sc250024 commented Jan 9, 2022

I had the same problem. This isn't a problem with helm-docs per se, but with the underlying Go template engine.

See here for a solution: https://stackoverflow.com/a/51326166/928203b (note how they escape the curly braces at the end of the code snippet)

@reitermarkus
Copy link

reitermarkus commented Feb 2, 2022

Thanks @sc250024 for the pointer, my problem was/is different, but also not caused by helm-docs. Well, at least not by the upstream version. See k8s-at-home/charts#1395.

@jasondamour
Copy link
Contributor

Maybe I misunderstood this thread, but I found that the yaml functions are truly not available, so I added them here: #176

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

5 participants