We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.2.204
Define a manifest with string-value as multiline yaml which contains empty string with number of spaces more than identation level:
---$ apiVersion: v1$ kind: ConfigMap$ metadata:$ name: cm$ data:$ stringkey: |$ hello: world$ $ test: value$
Note that after hello: world there is 5 spaces, while identation of string value yaml is 4 spaces.
hello: world
Run werf render (or werf helm template .helm):
werf render
werf helm template .helm
# Source: test/templates/cm.yaml apiVersion: v1 kind: ConfigMap metadata: name: cm annotations: project.werf.io/env: "" project.werf.io/name: x werf.io/version: dev data: stringkey: "hello: world\n \ntest: value\n"
stringkey value is no more multiline string.
stringkey
Running vanilla helm template .helm does not break multiline representation of stringkey:
helm template .helm
--- # Source: test/templates/cm.yaml apiVersion: v1 kind: ConfigMap metadata: name: cm data: stringkey: | hello: world test: value
No response
The text was updated successfully, but these errors were encountered:
More cases.
Works OK:
--- apiVersion: v1 kind: ConfigMap metadata: name: renew-role-mapping data: aa: | xx: hello {{ include "odsp_extend_role_mapping" . | indent 4 }}
Fails:
--- apiVersion: v1 kind: ConfigMap metadata: name: renew-role-mapping data: aa: | xx: hello key: {{ include "odsp_extend_role_mapping" . | indent 6 }}
Workaround is to add trim either in include statement or in the template definition itself:
{{ include "odsp_extend_role_mapping" . | trim | indent 6 }}
Or:
{{- define "odsp_extend_role_mapping" -}} # << right trim here ... {{- end }}
Sorry, something went wrong.
Solved in werf v2.
No branches or pull requests
Before proceeding
Version
1.2.204
How to reproduce
Define a manifest with string-value as multiline yaml which contains empty string with number of spaces more than identation level:
Note that after
hello: world
there is 5 spaces, while identation of string value yaml is 4 spaces.Result
Run
werf render
(orwerf helm template .helm
):stringkey
value is no more multiline string.Expected result
Running vanilla
helm template .helm
does not break multiline representation ofstringkey
:Additional information
No response
The text was updated successfully, but these errors were encountered: