ytt
ytt copied to clipboard
Add start of document "---" in the beginning of outputed YAML document
Describe the problem/challenge you have
YAML output produced by YTT don't include the start of document ---
in the beginning (first document).
Assuming I generate file-1.yml and file-2.yml with YTT, I'm used to do things like cat file-1.yml file-2.yml | kubectl apply -f -
but since file-2.yml doesn't start with ---
it doesn't work.
Describe the solution you'd like
Either add a flag to YTT to include ---
on beginning of every document (even the first one), or make this behavior default.
Anything else you would like to add: No
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
@damienleger i think this is a reasonable change we can make. just have to decide whether we should do it by default. i think we've done something similar for other carvel tools like kbld.
Any tooling downstream from ytt
ought to accept the optional document start (i.e. ---
) without problem. 👍🏻
I think this should be the default behavior and have the option to disable it should it either break something (e.g. a highly-precise test), or if there's some interaction with a future feature (e.g. if we ever decide to output comments).
Rationale for priority: This looks valuable. It's something that we'd definitely support a contribution on. It's not something the core maintainers are committing to do, right now.
Discussion from duplicate issue:
And to be clear, we're talking about non-empty documents, yeah?
I ask because I know of a few cases where we rely on skipping empty documents to keep the output sane.
We should not add ---
on empty documents.