Skip to content

Commit

Permalink
Remove docs and examples changes from PR
Browse files Browse the repository at this point in the history
Signed-off-by: Elliot Gunton <[email protected]>
  • Loading branch information
elliotgunton committed Mar 4, 2024
1 parent b0a913e commit c7c610c
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 120 deletions.
3 changes: 1 addition & 2 deletions docs/examples/workflows-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ Explore the examples through the side bar!
| [template-defaults](https://github.com/argoproj/argo-workflows/blob/main/examples/template-defaults.yaml) |
| [testvolume](https://github.com/argoproj/argo-workflows/blob/main/examples/testvolume.yaml) |
| [timeouts-step](https://github.com/argoproj/argo-workflows/blob/main/examples/timeouts-step.yaml) |
| [title-and-description-with-markdown](https://github.com/argoproj/argo-workflows/blob/main/examples/title-and-description-with-markdown.yaml) |
| [withsequence-nested-result](https://github.com/argoproj/argo-workflows/blob/main/examples/withsequence-nested-result.yaml) |
| [title-and-descriptin-with-markdown](https://github.com/argoproj/argo-workflows/blob/main/examples/title-and-descriptin-with-markdown.yaml) |
| [work-avoidance](https://github.com/argoproj/argo-workflows/blob/main/examples/work-avoidance.yaml) |
| [workflow-count-resourcequota](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-count-resourcequota.yaml) |
| [workflow-event-binding/event-consumer-workfloweventbinding](https://github.com/argoproj/argo-workflows/blob/main/examples/workflow-event-binding/event-consumer-workfloweventbinding.yaml) |
Expand Down
116 changes: 57 additions & 59 deletions docs/examples/workflows/template_level_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,35 @@ See https://argo-workflows.readthedocs.io/en/latest/walk-through/volumes/
spec:
entrypoint: generate-and-use-volume
templates:
- inputs:
parameters:
- name: pvc-size
name: generate-volume
outputs:
- name: generate-and-use-volume
steps:
- - name: generate-volume
template: generate-volume
arguments:
parameters:
- name: pvc-size
# In a real-world example, this could be generated by a previous workflow step.
value: '1Gi'
- - name: generate
template: whalesay
arguments:
parameters:
- name: pvc-name
value: '{{steps.generate-volume.outputs.parameters.pvc-name}}'
- - name: print
template: print-message
arguments:
parameters:
- name: pvc-name
value: '{{steps.generate-volume.outputs.parameters.pvc-name}}'

- name: generate-volume
inputs:
parameters:
- name: pvc-name
valueFrom:
jsonPath: '{.metadata.name}'
- name: pvc-size
resource:
action: create
setOwnerReference: true
manifest: |
apiVersion: v1
kind: PersistentVolumeClaim
Expand All @@ -94,62 +112,42 @@ See https://argo-workflows.readthedocs.io/en/latest/walk-through/volumes/
resources:
requests:
storage: '{{inputs.parameters.pvc-size}}'
setOwnerReference: true
- container:
args:
- echo generating message in volume; cowsay hello world | tee /mnt/vol/hello_world.txt
command:
- sh
- -c
image: docker/whalesay:latest
volumeMounts:
- mountPath: /mnt/vol
name: workdir
outputs:
parameters:
- name: pvc-name
valueFrom:
jsonPath: '{.metadata.name}'

- name: whalesay
inputs:
parameters:
- name: pvc-name
name: whalesay
- name: pvc-name
volumes:
- name: workdir
persistentVolumeClaim:
claimName: '{{inputs.parameters.pvc-name}}'
- container:
args:
- echo getting message from volume; find /mnt/vol; cat /mnt/vol/hello_world.txt
command:
- sh
- -c
image: alpine:latest
- name: workdir
persistentVolumeClaim:
claimName: '{{inputs.parameters.pvc-name}}'
container:
image: docker/whalesay:latest
command: [sh, -c]
args: ["echo generating message in volume; cowsay hello world | tee /mnt/vol/hello_world.txt"]
volumeMounts:
- mountPath: /mnt/vol
name: workdir
- name: workdir
mountPath: /mnt/vol

- name: print-message
inputs:
parameters:
- name: pvc-name
name: print-message
volumes:
- name: workdir
persistentVolumeClaim:
claimName: '{{inputs.parameters.pvc-name}}'
- name: generate-and-use-volume
steps:
- - arguments:
parameters:
- name: pvc-size
value: 1Gi
name: generate-volume
template: generate-volume
- - arguments:
parameters:
- name: pvc-name
value: '{{steps.generate-volume.outputs.parameters.pvc-name}}'
name: generate
template: whalesay
- - arguments:
parameters:
parameters:
- name: pvc-name
value: '{{steps.generate-volume.outputs.parameters.pvc-name}}'
name: print
template: print-message
volumes:
- name: workdir
persistentVolumeClaim:
claimName: '{{inputs.parameters.pvc-name}}'
container:
image: alpine:latest
command: [sh, -c]
args: ["echo getting message from volume; find /mnt/vol; cat /mnt/vol/hello_world.txt"]
volumeMounts:
- name: workdir
mountPath: /mnt/vol
```

116 changes: 57 additions & 59 deletions examples/workflows/template-level-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,35 @@ metadata:
spec:
entrypoint: generate-and-use-volume
templates:
- inputs:
parameters:
- name: pvc-size
name: generate-volume
outputs:
- name: generate-and-use-volume
steps:
- - name: generate-volume
template: generate-volume
arguments:
parameters:
- name: pvc-size
# In a real-world example, this could be generated by a previous workflow step.
value: '1Gi'
- - name: generate
template: whalesay
arguments:
parameters:
- name: pvc-name
value: '{{steps.generate-volume.outputs.parameters.pvc-name}}'
- - name: print
template: print-message
arguments:
parameters:
- name: pvc-name
value: '{{steps.generate-volume.outputs.parameters.pvc-name}}'

- name: generate-volume
inputs:
parameters:
- name: pvc-name
valueFrom:
jsonPath: '{.metadata.name}'
- name: pvc-size
resource:
action: create
setOwnerReference: true
manifest: |
apiVersion: v1
kind: PersistentVolumeClaim
Expand All @@ -26,60 +44,40 @@ spec:
resources:
requests:
storage: '{{inputs.parameters.pvc-size}}'
setOwnerReference: true
- container:
args:
- echo generating message in volume; cowsay hello world | tee /mnt/vol/hello_world.txt
command:
- sh
- -c
image: docker/whalesay:latest
volumeMounts:
- mountPath: /mnt/vol
name: workdir
outputs:
parameters:
- name: pvc-name
valueFrom:
jsonPath: '{.metadata.name}'

- name: whalesay
inputs:
parameters:
- name: pvc-name
name: whalesay
- name: pvc-name
volumes:
- name: workdir
persistentVolumeClaim:
claimName: '{{inputs.parameters.pvc-name}}'
- container:
args:
- echo getting message from volume; find /mnt/vol; cat /mnt/vol/hello_world.txt
command:
- sh
- -c
image: alpine:latest
- name: workdir
persistentVolumeClaim:
claimName: '{{inputs.parameters.pvc-name}}'
container:
image: docker/whalesay:latest
command: [sh, -c]
args: ["echo generating message in volume; cowsay hello world | tee /mnt/vol/hello_world.txt"]
volumeMounts:
- mountPath: /mnt/vol
name: workdir
- name: workdir
mountPath: /mnt/vol

- name: print-message
inputs:
parameters:
- name: pvc-name
name: print-message
volumes:
- name: workdir
persistentVolumeClaim:
claimName: '{{inputs.parameters.pvc-name}}'
- name: generate-and-use-volume
steps:
- - arguments:
parameters:
- name: pvc-size
value: 1Gi
name: generate-volume
template: generate-volume
- - arguments:
parameters:
- name: pvc-name
value: '{{steps.generate-volume.outputs.parameters.pvc-name}}'
name: generate
template: whalesay
- - arguments:
parameters:
parameters:
- name: pvc-name
value: '{{steps.generate-volume.outputs.parameters.pvc-name}}'
name: print
template: print-message
volumes:
- name: workdir
persistentVolumeClaim:
claimName: '{{inputs.parameters.pvc-name}}'
container:
image: alpine:latest
command: [sh, -c]
args: ["echo getting message from volume; find /mnt/vol; cat /mnt/vol/hello_world.txt"]
volumeMounts:
- name: workdir
mountPath: /mnt/vol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: title-and-description-with-markdown-
labels:
workflows.argoproj.io/archive-strategy: "false"
annotations:
workflows.argoproj.io/title: "**Test Title**"
workflows.argoproj.io/description: |
`This is a simple hello world example.`
You can also run it in Python: https://couler-proj.github.io/couler/examples/#hello-world
spec:
entrypoint: whalesay
templates:
- name: whalesay
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]

0 comments on commit c7c610c

Please sign in to comment.