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

Volume Mounts in Script Step #852

Closed
tommyJimmy87 opened this issue May 8, 2018 · 4 comments
Closed

Volume Mounts in Script Step #852

tommyJimmy87 opened this issue May 8, 2018 · 4 comments
Labels

Comments

@tommyJimmy87
Copy link

Is this a BUG REPORT or FEATURE REQUEST?:

Bug Report ? I don't know

What happened:

Pod "tefde-vajont-test-argo-2763208270" is invalid: spec.containers[0].volumeMounts[0].name: Not found: "volumeName"

What you expected to happen: The volume is mounted correctly in my container

How to reproduce it (as minimally and precisely as possible):

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: argo
  namespace: namespace
  generateName: k6-workflow
spec:
  serviceAccountName: argo
  entrypoint: k6test
  volumes:
  - name: volumeName
    secret:
      secretName: secret
  templates:
  - name: k6test
    steps:
    - - name: step1
        template: step1
  - name: step1
    script:
      volumeMounts:
      - name: volumeName
        mountPath: /path/something
      image: image/something
      command: [bash]
      source: |
           something

Environment:

  • Argo version: 2.1.0

  • Kubernetes version : 1.8.10

@jessesuen
Copy link
Member

Might be a bug with volumes + script templates. Will take a look.

@jessesuen
Copy link
Member

jessesuen commented May 17, 2018

Here is a workaround which uses raw input artifacts:

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:
          data: |
            this is
            the raw file
            contents
    container:
      image: python:3.7
      command: [sh, -c]
      args: ["python /tmp/file > /tmp/output"]
  outputs:
    parameters:
    - name: my-output
      valueFrom:
          path: /tmp/output

@tommyJimmy87
Copy link
Author

Nice, thanks !

@turnerno8
Copy link

Hi, I'm seeing exactly the same issue - was this bug fixed?

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

No branches or pull requests

3 participants