Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Why
If we render
config.yaml
before encoding it into struct, users will be able to write more complex, richer configuration files(likevalues.yaml
ofhelm
)And there are many matured FuncMaps of go template, such as sprig.
e.g. with sprig, it is easy to read env from
config.yaml
:(
env
is a built-in template function ofsprig
)Conflicts && Solutions
However, the current devstream syntax is not the standard go template (nothing to do with the difference between
{{
and[[
, this is justdelims
)Conflicts are mainly focused on variable references and output references.
Here is the current syntax of dtm defined:
For variable references , dtm is missing a
.
compared to the standard go template:The output references are a bit more complex, with two solutions:
outputs
a built-in top-level object, similar to.Values
ofhelm
, and then refer to it with variable syntax.outputs
as a custom function.The following is a demo code with outputs as a function.
Beta Was this translation helpful? Give feedback.
All reactions