Closed danielxvu closed 1 year ago
This one is quite tricky to fix. Used YAML encoder sigs.k8s.io/yaml v1.2.0
creates line breaks for all lines longer than 80 symbols. Which is fine, because such quotes in the middle of the string are not expected for YAML value (but ok for a helm template). I will try to find another encoder allowing to disable such line breaks but not sure that it is possible.
For instance, go-yaml also not allowing to disable line breaks
I wrote a tool to sanitize templates generated by helmify. It just works for now without handling complicated cases.
https://github.com/yxd-ym/go-template-sanitizer
Just
cat your-template.yaml | go-template-sanitizer
@danielxvu is your required error {{ required "credentials.elasticHost is required" .Values.credentials.elasticHost | b64enc | quote }}
due to the same error? Or does this error has a different source issue?
@vicentefb No. This issue is caused by an overly long key like ELASTIC_FOOBAR_HUNTER123_MEOWTOWN_VERIFY.
I'm having the same issue on a secret object. @arttor are you still working on this?
Fixed in 0.3.22 release.
Thank you!
The following snippet of YAML results in an invalid credentials.yaml file:
The resulting output:
Running
helm install
will error out because of the invalid YAML generated for key names past a certain length:Thanks for your work on this, by the way.