4 ms·
ah yes, this technique, with its lack of template inputs and way of (not) handling indentation is exactly what I mean.
by janpot 7y ago
ah yes, this technique, with its lack of template inputs and way of (not) handling indentation is exactly what I mean.
- mfer 7y agoI'm sorry for the confusion. Go templates have piping which is how this is expected to be handled. There are functions of nindent and indent that handle the indentation. Inputs can be passed in. In fact, in the chart created using `helm create` this happen. For example, if you do `helm create foo` you can find snippets that read `{{- include "foo.labels" . | nindent 4 }}`. This includes a template, passes in `.` (the scope of variables for that template), and passes the output to `nindent` to get the needed indentation. This is just an example and it's using go templates way of doing things.
- mamon 7y agoAnd that's exactly the problem. With better templating language you shouldn't need this "| nindent 4" expression at all.
- mfer 7y agoI see, the problem is with the Go templating syntax. So, more context... Helm was designed to support more than one templating system. The problem was that the majority of people were ok with Go templates so no one contributed support for other systems.