User Container This example showcases the user of a user container with a volume mount. HeraYAML 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21from hera.workflows import ( DAG, UserContainer, Workflow, models as m, script, ) @script( sidecars=[ UserContainer(name="sidecar-name", volume_mounts=[m.VolumeMount(mount_path="/whatever", name="something")]) ] ) def foo(): print("hi") with Workflow(generate_name="sidecar-volume-mount-", entrypoint="d") as w: with DAG(name="d"): foo() 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: generateName: sidecar-volume-mount- spec: entrypoint: d templates: - dag: tasks: - name: foo template: foo name: d - name: foo script: command: - python image: python:3.8 source: 'import os import sys sys.path.append(os.getcwd()) print(''hi'')' sidecars: - name: sidecar-name volumeMounts: - mountPath: /whatever name: something Comments