Closed knack-roque closed 2 years ago
Thank you for the detailed report!
I did not see whether it was resolved by subsequent updates, I never ran into this in my own testing unfortunately. We've just put out one more release of Helm Operator with go-yaml at the latest v2, hopefully that fixed it.
Please let us know if there's anything we can do to help you migrate past Helm Operator, the Flux v2 is in active development and continues to pass new feature milestones on the way to GA. I'm going to go ahead and close this, as the specific version pins we have chosen are now carefully tuned for compatibility balanced with security and to mitigate CVEs, if you have any further suggestion welcome to reopen or open again – please accept our thanks for participating in Flux 🎉
Describe the bug
In helm-operator 1.4.2 we are encountering a problem with templating wrapping a line in the a variable reference causing an "unclosed action" as the
}}
to close the reference are now on a different line. Deploying the same chart with the same values using helm-operator 1.3.0 does not encounter this issue.I understand helm-operator is no longer supported but I'm putting this here in case anyone else runs into the issue since it was irritating me for a while.
To Reproduce
This should fail for more than just our case but how we're getting into it is that we're deploy the kube-prometheus-stack chart as part of an umbrella chart and inside the values of the umbrella chart we're passing something that will need to be further templated.
values.yaml:
grafana's _pod.yaml bundled with prometheus:
See the logs section below for the full error message but the important bit is
image: '{{ .Values.global.imageRegistry }}/{{ .Values.global.postgresql.repository\n }}:{{ .Values.global.postgresql.tag }}'\n
where there is an incorrect\n
being added into the middle variable reference.Expected behavior
No error to occur and the chart to be installed successfully.
Logs
Additional context
Workaround I changed go.mod by adding the following to force to the version of go-yaml used in helm-operator v1.3.0 and then rebuilt helm-operator v1.4.2
There should be some way to set
disableLineWrapping = true
but I'm not strong enough on go to know where to put that.Upstream link to why this worked previously and no longer is https://github.com/go-yaml/yaml/pull/670 where they swapped the default back to no longer handle line wrapping.