Argo: Volume Mounts in Script Step

Created on 8 May 2018  路  3Comments  路  Source: argoproj/argo

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
bug

Most helpful comment

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

All 3 comments

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

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

Nice, thanks !

Was this page helpful?
0 / 5 - 0 ratings