-
Notifications
You must be signed in to change notification settings - Fork 42
Support for writing stdin to a parameter. #66
Description
Is this a BUG REPORT or FEATURE REQUEST?:
- feature
What happened: Having a hard time specifying JSON on the command line. And I don't wish to read from a file in git/etc in every case. Need a clean way to code stdin for kubectl into the job.
What you expected to happen: A stdin param would make this easy.
How to reproduce it (as minimally and precisely as possible): Try bash here docs or bash here strings with apply operations that idempotently create namespaces. Quoting and carriage returns make these hacks untenable.
Anything else we need to know?: I generate my pipelines from jsonnet. It renders to json/yaml all the same.
Environment: docker-compose file from main repo.
Here's a concept sketch of what I'm looking for. Perhaps there is already something like this that I missed.
jobs:
- name: kubectl.create_namespace(docker-for-desktop, common)
plan:
- params:
kubectl: apply -f -
stdin: |
apiVersion: v1
kind: Namespace
metadata:
labels:
name: common
name: common
put: kubectl.profile(docker-for-desktop)