Replies: 2 comments 2 replies
-
I found a solution in Before: {
foo: '<{{ source "blah" }}',
} After: {
foo: |||
<{{ source "blah" }}
|||,
} This hints to jsonnet that it should put the string in a YAML block notation like: foo: |
<{{ source "blah" }} |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed case. In YAML
I am not sure if you shared the correct issue 😄
Since you mentioned Helm, is this a technique that would work for Helm? We run one Go templating at start time and then after each resource we run a second one to retrieve information for When the generated value contains specials characters, then we often use:
If that interest you, a while ago, I experimented with Cuelang. I don't see much interest, so I stopped investigating more, but I think It could be useful for more complex pipelines |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
For example, use this config and replace
'<{{ source "currentTraefikVersion" }}'
with"<{{ source \"currentTraefikVersion\" }}"
. According to every other YAML parser I've tried, these are equivalent strings.But when I
updatecli apply
the config with the escaped quotes, I get an error:This appears to be related to the same problem from this issue. However my problem is I'm generating the YAML using
jsonnet
, which doesn't let me influence how the strings get rendered (jsonnet
always renders with the escaped double quotes). So I can't just use the single-quote methodAs the person in the Helm issue above complains, this appears to be a bug in Helm's YAML parser, yet they have seemingly refused to fix it. I'm unsure how exactly Helm's code comes into
updatecli
in this case, but I'm wondering what workarounds there might be. Or if this bug could somehow be fixed inupdatecli
even if it's still broken in Helm.Beta Was this translation helpful? Give feedback.
All reactions