-
Notifications
You must be signed in to change notification settings - Fork 253
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
fix generate-yaml by escaping newlines #404
Conversation
We had a problem with generate-yaml.sh because yq rejected the invalid YAML. To work around this we have to make sure the master.yaml is also a valid YAML. So functions like Indent are no option. One option to solve this would have been base64Encode, but the problem is that Ignition has no property to specify that the inline content is base64 encoded. The only would have been `inline: !! binary |`, but then yq complains that {{ .CaCert | Base64Encode }} is not correctly encoded. So the solution was to just replace the new lines with \n
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jichenjc, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@sbueringer: you cannot LGTM your own PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
We had a problem with generate-yaml.sh because yq rejected the invalid YAML. To work around this we have to make sure the master.yaml is also a valid YAML. So functions like Indent are no option. One option to solve this would have been base64Encode, but the problem is that Ignition has no property to specify that the inline content is base64 encoded. The only would have been `inline: !! binary |`, but then yq complains that {{ .CaCert | Base64Encode }} is not correctly encoded. So the solution was to just replace the new lines with \n
We had a problem with generate-yaml.sh because yq rejected the invalid YAML.
To work around this we have to make sure the master.yaml is also a valid YAML.
So functions like Indent are no option. One option to solve this would have been
base64Encode, but the problem is that Ignition has no property to specify that the
inline content is base64 encoded. The only would have been
inline: !! binary |
, butthen yq complains that {{ .CaCert | Base64Encode }} is not correctly encoded.
So the solution was to just replace the new lines with \n
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #402