Skip to content

Add start of document "---" in the beginning of outputed YAML document #477

Open
@damienleger

Description

@damienleger

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.

Activity

added
carvel triageThis issue has not yet been triaged for relevance
enhancementThis issue is a feature request
on Aug 19, 2021
cppforlife

cppforlife commented on Aug 20, 2021

@cppforlife
Contributor

@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.

added
carvel acceptedThis issue should be considered for future work and that the triage process has been completed
and removed
carvel triageThis issue has not yet been triaged for relevance
on Aug 24, 2021
pivotaljohn

pivotaljohn commented on Aug 24, 2021

@pivotaljohn
Contributor

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).

added
priority/unprioritized-backlogHigher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.
on Aug 24, 2021
pivotaljohn

pivotaljohn commented on Aug 24, 2021

@pivotaljohn
Contributor

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.

added
discussionThis issue is not a bug or feature and a conversation is needed to find an appropriate resolution
on Oct 14, 2021
cari-lynn

cari-lynn commented on Nov 11, 2021

@cari-lynn
Contributor

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.

moved this to To Triage in Carvelon Aug 18, 2022
moved this from To Triage to Unprioritized in Carvelon Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    carvel acceptedThis issue should be considered for future work and that the triage process has been completeddiscussionThis issue is not a bug or feature and a conversation is needed to find an appropriate resolutionenhancementThis issue is a feature requestpriority/unprioritized-backlogHigher priority than priority/awaiting-more-evidence but not planned. Contributions are welcome.

    Type

    No type

    Projects

    • Status

      To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @cppforlife@aaronshurley@pivotaljohn@damienleger@cari-lynn

      Issue actions

        Add start of document "---" in the beginning of outputed YAML document · Issue #477 · carvel-dev/ytt