splunk / qbec

configure kubernetes objects on multiple clusters using jsonnet
https://qbec.io
Apache License 2.0
172 stars 37 forks source link

add --multi flag to jsonnet-qbec binary #65

Open gree-gorey opened 5 years ago

gree-gorey commented 5 years ago

This is a feature proposal.

I used jsonnet to render kube-prometheus manifests. However, native jsonnet lacks the parseYaml function that I really need. So I started using jsonnet-qbec tool which is a great tool, but now I miss the --multi argument that native jsonnet binary has: it allows you to "Write multiple files to the directory, list files on stdout". It is very helpful for using with pipes when you have really large json output, smth like:

jsonnet -J vendor --multi manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- {}
gotwarlost commented 5 years ago

To be honest jsonnet-qbec is half assed in terms of providing just the basic form of the eval command and parsing the command line differently from how go-Jsonnet does it. I think this could be fixed by mostly copying the main program from the go-jsonnet repo. Happy to accept a PR if you want to do that.

Sent from my iPhone

On Aug 9, 2019, at 6:12 AM, Grigorii Ignatev notifications@github.com wrote:

This is a feature proposal.

I used jsonnet to render kube-prometheus manifests. However, native jsonnet lacks the parseYaml function that I really need. So I started using jsonnet-qbec tool which is a great tool, but now I miss the --multi argument that native jsonnet binary has: it allows you to "Write multiple files to the directory, list files on stdout". It is very helpful for using with pipes when you have really large json output, smth like:

jsonnet -J vendor --multi manifests "${1-example.jsonnet}" | xargs -I{} sh -c 'cat {} | gojsontoyaml > {}.yaml; rm -f {}' -- {} — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.