Skip to content
This repository was archived by the owner on Apr 27, 2020. It is now read-only.

Support for writing stdin to a parameter. #66

@jmdots

Description

@jmdots

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions