Description
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To Triage
Activity
cppforlife commentedon Aug 20, 2021
@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.
pivotaljohn commentedon Aug 24, 2021
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).
pivotaljohn commentedon Aug 24, 2021
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.
---
for all YAML files #182cari-lynn commentedon Nov 11, 2021
Discussion from duplicate issue:
We should not add
---
on empty documents.