Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: raw contents as a new input artifact type #648

Closed
jessesuen opened this issue Dec 30, 2017 · 2 comments · Fixed by #687
Closed

Proposal: raw contents as a new input artifact type #648

jessesuen opened this issue Dec 30, 2017 · 2 comments · Fixed by #687
Milestone

Comments

@jessesuen
Copy link
Member

jessesuen commented Dec 30, 2017

I would like to introduce a new input artifact type, called raw, which would take the literal value from a "contents" sub field and place it in the specified path as a file. Example below:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: input-artifact-raw-
spec:
  entrypoint: raw-contents
  templates:
  - name: raw-contents
    inputs:
      artifacts:
      - name: myfile
        path: /tmp/file
        raw:
          contents: |
            this is
            the raw file
            contents
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["cat /tmp/file"]

The use case is to be able to take small pieces of data (json, yaml, diff files) and provide some convenience to the user by not having to do things like echo strings into files, worry about shell escaping, etc...

@jessesuen jessesuen added the type/feature Feature request label Dec 30, 2017
@jessesuen
Copy link
Member Author

jessesuen commented Dec 30, 2017

We should also be able to do something like:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: input-artifact-raw-
spec:
  entrypoint: raw-contents
  templates:
  - name: raw-contents
    inputs:
      parameters:
      - name: contents  
      artifacts:
      - name: myfile
        path: /tmp/file
        raw:
          contents: "{{inputs.parameters.contents}}"
    container:
      image: alpine:latest
      command: [sh, -c]
      args: ["cat /tmp/file"]

@jessesuen
Copy link
Member Author

@pnovotnak although this doesn't address issue #646, would this at all help with your json passing problems?

@jessesuen jessesuen added proposal and removed type/feature Feature request labels Jan 2, 2018
@jessesuen jessesuen added this to the v2.0.0-beta1 milestone Jan 11, 2018
sandeepbhojwani pushed a commit to sandeepbhojwani/argo that referenced this issue Jan 16, 2018
sandeepbhojwani pushed a commit that referenced this issue Jan 16, 2018
icecoffee531 pushed a commit to icecoffee531/argo-workflows that referenced this issue Jan 5, 2022
…#648)

* feat: Unified gateway deployment image. Closes argoproj#639

* make deployment logic change

* update manifests

* Dockerfile change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant