I use vscode as an editor and have several yaml files in the project where parameter replacement occurs. However, it re-formats only one file with extra spaces between brackets, a file named service.yaml used by helm in our ci/cd pipeline. See below for before and after. 
and after 
I was wondering if the name of the file has particular significance for vscode or any other extensions... Thanks.
Uncheck Bracket Spacing in Extensions/YAML.

Edit: There is a caveat. This will format {{ foo }} or { { foo } } to {{foo}}, which is not necessarily syntactically correct in terms of Jinja templating.
One of the way how to resolve this issue - wrap values into the quotes.
Like this:
app: "{{ .Values.name }}"
Probably not the best solution, but it works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With