Skip to content
New issue

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

Cannot read yaml with block string or string with new lines. #1142

Open
blmhemu opened this issue Aug 23, 2024 · 2 comments
Open

Cannot read yaml with block string or string with new lines. #1142

blmhemu opened this issue Aug 23, 2024 · 2 comments

Comments

@blmhemu
Copy link

blmhemu commented Aug 23, 2024

Cannot parse yaml files with newlines in strings.
ex:

cert: |
  ----BEGIN----
  ----END-----

Tried with

cert: '----BEGIN---\n....\n----END----'

still not working

@blmhemu
Copy link
Author

blmhemu commented Aug 23, 2024

Workaround for the wanderers - base64 encode the multiline string (and use std.base64 in jsonnet if you want actual value)

@zerok
Copy link
Contributor

zerok commented Sep 3, 2024

How are you loading the YAML data? std.parseYaml(importstr "dummy.yaml") seems to work for me 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

No branches or pull requests

2 participants