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

Implement something like helm's include function #170

Open
cwrau opened this issue Jan 26, 2023 · 0 comments
Open

Implement something like helm's include function #170

cwrau opened this issue Jan 26, 2023 · 0 comments
Labels
bug Something isn't working question Further information is requested

Comments

@cwrau
Copy link

cwrau commented Jan 26, 2023

I'm trying to get the major version of my chart and I've tried the following;

{{ regexReplaceAllLiteral "^(\d+)\.\d+\.\d+$" (template "chart.version" .) "${1}" }}

resulting in;

Error generating gotemplates for chart .: template: .:19: invalid syntax
{{ regexReplaceAllLiteral "^(\d+)\.\d+\.\d+$" (include "chart.version" .) "${1}" }}

resulting in the same error.

Trying to narrow it down I tried;

{{- $version := template "chart.version" . }}

resulting in;

Error generating gotemplates for chart .: template: .:19: unexpected <template> in command

At last I tried;

{{- $version := include "chart.version" . }}

resulting in;

Error generating gotemplates for chart .: template: .:19: function "include" not defined

How can we work with the templates you supply us?

I'm actually confused why you added sprig if we have nothing to use it with? Therefore I'm also thinking that I might have missed something 😅

@Nepo26 Nepo26 added bug Something isn't working question Further information is requested labels Jun 29, 2023
@Nepo26 Nepo26 added this to the General Cleanup milestone Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
Status: No status
Development

No branches or pull requests

2 participants