-
Notifications
You must be signed in to change notification settings - Fork 568
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
remove the "gotmpl" extension for template values #515
Comments
for instance I was using the simple .yaml file and not I need to templatize it. |
There were edge cases that you need to write golang text templates as plaintext, like writing Prometheus Alertmanager config 😄 |
I was even considering to make |
indeed I see your case I don't mind either way. And you are right .yaml file for go template is not the ideal extension. |
@mumoshu I've just discovered the edge case for Prometheus AlertManager and was surprised by the fact that helmfile.yaml is a template. It seems that it's possible to change the curly bracket separator with other separator. Have you considered that option? |
@sebastien-prudhomme Hey! I've considered that, but had no idea how we could cleanly implemented it. Are you aware of any way to instruct golang text/template to use another separator? |
@mumoshu Here they talk about the Delims function: https://stackoverflow.com/questions/17641887/how-do-i-escape-and-delimiters-in-go-templates |
@mumoshu one issue with |
@Xroker Hey! Thanks for the idea. But I don't think that's "correct", as it isn't a YAML file in the first place. A valid go-template file that generates a YAML can easily be an invalid YAML file. |
@mumoshu Fair enough, I can see such cases. But for the users who are confident in "validity" of the yaml files, what do you think about allowing both |
@Xroker Just to be sure- you use go templates but still want it it look like a regular YAML to IDE? If it's a plain YAML without go template you can just use Just asking because I'm not sure how |
@mumoshu I was thinking about simpler cases such as the one described here: https://github.com/roboll/helmfile#environment-values In the example, releases in helmfile.yaml reference to Could you clarify why you believe that the file extension format should dictate the order of parsing? This seems to be open for interpretation and can vary in different applications. |
Just my common sense. Can you expect |
Can you just separate values.yaml.gotmpl and values.yaml and benefit the IDE syntax highlighting on values.yaml only, in your release? Only the dynamic part needs to be in values.yaml.gotmpl. |
it would be great if there is a solution for this issue I can't find a single extension for VS code to highlight |
@balusarakesh I ended up setting the following in "files.associations": {
"*.yaml.gotmpl": "yaml"
} |
I did something like that, for anyone interested here's a link |
following the comment here : #388 (comment)
I was simply wondering why there is a difference between plain values and templated ones.
In other term what would it cost to consider all values files as templates whatever their name cause running the template engine on a plain yaml should not fail anyway.
That would make things much easier.
The text was updated successfully, but these errors were encountered: