Skip to content

Commit

Permalink
fix: replace whalesay with busybox
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Collins <[email protected]>
  • Loading branch information
tico24 committed Nov 8, 2024
1 parent a5812bd commit e4ac595
Show file tree
Hide file tree
Showing 28 changed files with 102 additions and 119 deletions.
1 change: 0 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"statefulsets",
"vjvwg",
"waitforminio",
"whalesay",
"workfloweventbinding",
"workfloweventbindings",
"workflowtaskresults",
Expand Down
4 changes: 2 additions & 2 deletions argo-workflows/api/assets/hello-workflowtemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ spec:
parameters:
- name: message
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["{{inputs.parameters.message}}"]
6 changes: 3 additions & 3 deletions argo-workflows/api/create-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ curl \
{
"name": "main",
"container": {
"image": "docker/whalesay",
"image": "busybox",
"command": [
"cowsay"
"echo"
],
"args": [
"hello world"
Expand Down Expand Up @@ -53,4 +53,4 @@ You should see something like:

## Exercise

Create a workflow template and then submit the workflow template using the API.
Create a workflow template and then submit the workflow template using the API.
5 changes: 3 additions & 2 deletions argo-workflows/getting-started/assets/hello-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
command: ["cowsay"]
image: busybox
command: ["echo"]
args: ["hello world"]
4 changes: 2 additions & 2 deletions argo-workflows/getting-started/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
command: ["cowsay"]
image: busybox
command: ["echo"]
```{{copy}}
Click "Create". You will see a diagram of the workflow. The yellow icon shows that it is pending, after a few seconds it'll turn blue to indicate it is running, and finally green to show that it has completed successfully:
Expand Down
6 changes: 4 additions & 2 deletions argo-workflows/getting-started/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ spec:
templates:
- name: main
container: # this is a container template
image: docker/whalesay # this image prints "hello world" to the console
command: ["cowsay"]
image: busybox # this is the image to run
command: ["echo"]
args: ["hello world"]

```

There are several other types of templates, and we'll come to more of them soon.
Expand Down
6 changes: 3 additions & 3 deletions argo-workflows/inputs-and-outputs/artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ the manifest. Each output artifact declares:
```yaml
- name: save-message
container:
image: docker/whalesay
image: busybox
command: [ sh, -c ]
args: [ "cowsay hello world > /tmp/hello_world.txt" ]
args: [ "echo hello world > /tmp/hello_world.txt" ]
outputs:
artifacts:
- name: hello-art
Expand All @@ -47,7 +47,7 @@ To declare an input artifact, you must include `inputs` in the manifest. Each in
- name: message
path: /tmp/message
container:
image: docker/whalesay
image: busybox
command: [ sh, -c ]
args: [ "cat /tmp/message" ]
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ spec:

- name: save-message
container:
image: docker/whalesay
image: busybox
command: [sh, -c]
args: ["cowsay hello world > /tmp/hello_world.txt"]
args: ["echo hello world > /tmp/hello_world.txt"]
outputs:
artifacts:
- name: hello-art
Expand All @@ -35,6 +35,6 @@ spec:
- name: message
path: /tmp/message
container:
image: docker/whalesay
image: busybox
command: [sh, -c]
args: ["cat /tmp/message"]
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ spec:
parameters:
- name: message
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["{{inputs.parameters.message}}"]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
dag:
tasks:
- name: generate-parameter
template: whalesay
template: echo
- name: consume-parameter
template: print-message
dependencies:
Expand All @@ -19,9 +19,9 @@ spec:
- name: message
value: "{{tasks.generate-parameter.outputs.parameters.hello-param}}"

- name: whalesay
- name: echo
container:
image: docker/whalesay
image: busybox
command: [sh, -c]
args: ["echo -n hello world > /tmp/hello_world.txt"]
outputs:
Expand All @@ -35,6 +35,6 @@ spec:
parameters:
- name: message
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["{{inputs.parameters.message}}"]
27 changes: 7 additions & 20 deletions argo-workflows/inputs-and-outputs/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Let's have a look at an example:
parameters:
- name: message
container:
image: docker/whalesay
command: [ cowsay ]
image: busybox
command: [ echo ]
args: [ "{{inputs.parameters.message}}" ]
```
Expand Down Expand Up @@ -53,20 +53,7 @@ Let's check the output in the logs:
You should see:

```bash
______________
< Welcome to Argo! >
--------------
\
\
\
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
Welcome to Argo!
```

## Output Parameters
Expand All @@ -75,9 +62,9 @@ Output parameters can be from a few places, but typically the most versatile is
container creates a file with a message in it:

```yaml
- name: whalesay
- name: echo
container:
image: docker/whalesay
image: busybox
command: [sh, -c]
args: ["echo -n hello world > /tmp/hello_world.txt"]
outputs:
Expand All @@ -94,7 +81,7 @@ task using a **template tag**:
dag:
tasks:
- name: generate-parameter
template: whalesay
template: echo
- name: consume-parameter
template: print-message
dependencies:
Expand All @@ -119,7 +106,7 @@ You should see:
STEP TEMPLATE PODNAME DURATION MESSAGE
✔ parameters-vjvwg
main
├─✔ generate-parameter whalesay parameters-vjvwg-4019940555
├─✔ generate-parameter echo parameters-vjvwg-4019940555
43s
└─✔ consume-parameter print-message parameters-vjvwg-1497618270
8s
Expand Down
5 changes: 3 additions & 2 deletions argo-workflows/install-using-helm/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
command: ["cowsay"]
image: busybox
command: ["echo"]
args: ["hello world"]
```{{copy}}
Click "Create". You will see a diagram of the workflow. The yellow icon shows that it is pending, after a few seconds it'll turn blue to indicate it is running, and finally green to show that it has completed successfully:
Expand Down
5 changes: 3 additions & 2 deletions argo-workflows/reuse/assets/hello-workflowtemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["hello world"]
4 changes: 3 additions & 1 deletion argo-workflows/reuse/cron-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
image: busybox
command: ["echo"]
args: ["hello world"]
```
When it should be run is set in the `schedule` field, in the example every minute.
Expand Down
5 changes: 3 additions & 2 deletions argo-workflows/reuse/workflow-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
command: [ cowsay ]
image: busybox
command: [ echo ]
args: [ "hello world" ]
```
Let's create this workflow template:
Expand Down
4 changes: 2 additions & 2 deletions argo-workflows/templates/assets/container-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["hello world"]
10 changes: 5 additions & 5 deletions argo-workflows/templates/assets/dag-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ spec:
dag:
tasks:
- name: a
template: whalesay
template: echo
- name: b
template: whalesay
template: echo
dependencies:
- a
- name: whalesay
- name: echo
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["hello world"]
13 changes: 7 additions & 6 deletions argo-workflows/templates/assets/exit-handler-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ spec:
dag:
tasks:
- name: a
template: whalesay
template: echo
onExit: tidy-up

- name: whalesay
- name: echo
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["hello world"]

- name: tidy-up
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["tidy up!"]
4 changes: 2 additions & 2 deletions argo-workflows/templates/assets/template-tag-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["hello {{workflow.name}}"]
8 changes: 4 additions & 4 deletions argo-workflows/templates/assets/with-items-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
dag:
tasks:
- name: print-message
template: whalesay
template: echo
arguments:
parameters:
- name: message
Expand All @@ -18,11 +18,11 @@ spec:
- "hello world"
- "goodbye world"

- name: whalesay
- name: echo
inputs:
parameters:
- name: message
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["{{inputs.parameters.message}}"]
8 changes: 4 additions & 4 deletions argo-workflows/templates/assets/with-sequence-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ spec:
dag:
tasks:
- name: print-message
template: whalesay
template: echo
arguments:
parameters:
- name: message
value: "{{item}}"
withSequence:
count: 5

- name: whalesay
- name: echo
inputs:
parameters:
- name: message
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["{{inputs.parameters.message}}"]
4 changes: 2 additions & 2 deletions argo-workflows/templates/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ spec:
templates:
- name: main
container:
image: docker/whalesay
command: [cowsay]
image: busybox
command: [echo]
args: ["hello world"]
```
Expand Down
Loading

0 comments on commit e4ac595

Please sign in to comment.