`cdk8s synth --stdout` doesn't produce valid yaml output
See original GitHub issueDescription of the bug:
When running cdk8s synth --stdout
the output isn’t valid yaml. This is because the first line output is a file name. This makes it unnecessarily difficult to perform further parsing of the output, such as yaml-loading it to split it up into separate files etc.
I would expect the --stdout
flag to produce valid yaml
Reproduction Steps:
run cdk8s synth --stdout
Error Log:
Environment:
- Framework Version:
- OS:
Other:
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
synth - cdk8s
The cdk8s synth command is a convenience command which will simply execute the application defined in cdk8s.yaml under app . For example, if...
Read more >aws-cdk | Yarn - Package Manager
To import an existing resource to a CDK stack, follow the following steps: Run a cdk diff to make sure there are no...
Read more >API Reference | projen
DockerCompose, Create a docker-compose YAML file. ... Default: true; synth ( boolean ) Should we call project.synth() or instantiate the project (could ...
Read more >Separate output files of cdk8s synth - python - Stack Overflow
The following code will create one yaml file dist/clusterip.k8s.yaml contains all my defines of deployment and statefulset, is there way to ...
Read more >Integrating cdk8s with Flux - Max Brenner
So in its simplest form imagine a Git repository with a single YAML file that contains a basic Kubernetes manifest (e.g. Deployment + ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d like to make a suggestion - assuming file names in the output are important and intentional, can they not be preceded with
#
to make a YAML comment? E.g.:I am a bit surprised this isn’t being addressed or discussed - I’d thought that
cdk8s synth | kubectl apply -f -
would be something that a lot of people would use, especially those coming fromkustomize
which only recently updated its embedded version so previously had to usekustomize build | kubectl apply -f -
.This issue is now marked as stale because it hasn’t seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the “backlog” label.