From e4ac5954aeae52b916b761c11ea74d97fd089f7e Mon Sep 17 00:00:00 2001 From: Tim Collins Date: Fri, 8 Nov 2024 08:13:31 +0000 Subject: [PATCH] fix: replace whalesay with busybox Signed-off-by: Tim Collins --- .cspell.json | 1 - .../api/assets/hello-workflowtemplate.yaml | 4 +-- argo-workflows/api/create-workflow.md | 6 ++--- .../assets/hello-workflow.yaml | 5 ++-- argo-workflows/getting-started/ui.md | 4 +-- argo-workflows/getting-started/workflow.md | 6 +++-- .../inputs-and-outputs/artifacts.md | 6 ++--- .../assets/artifacts-workflow.yaml | 6 ++--- .../assets/input-parameters-workflow.yaml | 4 +-- .../assets/parameters-workflow.yaml | 10 +++---- .../inputs-and-outputs/parameters.md | 27 +++++-------------- argo-workflows/install-using-helm/ui.md | 5 ++-- .../reuse/assets/hello-workflowtemplate.yaml | 5 ++-- argo-workflows/reuse/cron-workflows.md | 4 ++- argo-workflows/reuse/workflow-templates.md | 5 ++-- .../templates/assets/container-workflow.yaml | 4 +-- .../templates/assets/dag-workflow.yaml | 10 +++---- .../assets/exit-handler-workflow.yaml | 13 ++++----- .../assets/template-tag-workflow.yaml | 4 +-- .../templates/assets/with-items-workflow.yaml | 8 +++--- .../assets/with-sequence-workflow.yaml | 8 +++--- argo-workflows/templates/container.md | 4 +-- argo-workflows/templates/dag.md | 18 ++++++------- argo-workflows/templates/exit-handler.md | 4 +-- argo-workflows/templates/loops.md | 18 ++++++------- argo-workflows/templates/template-tags.md | 19 +++---------- config/argo-events/minio-sensor.yaml | 8 +++--- config/argo-workflows/canary-workflow.yaml | 5 ++-- 28 files changed, 102 insertions(+), 119 deletions(-) diff --git a/.cspell.json b/.cspell.json index 8164e4d..3107245 100644 --- a/.cspell.json +++ b/.cspell.json @@ -50,7 +50,6 @@ "statefulsets", "vjvwg", "waitforminio", - "whalesay", "workfloweventbinding", "workfloweventbindings", "workflowtaskresults", diff --git a/argo-workflows/api/assets/hello-workflowtemplate.yaml b/argo-workflows/api/assets/hello-workflowtemplate.yaml index 881e81d..d21f8cf 100644 --- a/argo-workflows/api/assets/hello-workflowtemplate.yaml +++ b/argo-workflows/api/assets/hello-workflowtemplate.yaml @@ -14,6 +14,6 @@ spec: parameters: - name: message container: - image: docker/whalesay - command: [cowsay] + image: busybox + command: [echo] args: ["{{inputs.parameters.message}}"] diff --git a/argo-workflows/api/create-workflow.md b/argo-workflows/api/create-workflow.md index 46a51fc..cac2876 100644 --- a/argo-workflows/api/create-workflow.md +++ b/argo-workflows/api/create-workflow.md @@ -15,9 +15,9 @@ curl \ { "name": "main", "container": { - "image": "docker/whalesay", + "image": "busybox", "command": [ - "cowsay" + "echo" ], "args": [ "hello world" @@ -53,4 +53,4 @@ You should see something like: ## Exercise -Create a workflow template and then submit the workflow template using the API. \ No newline at end of file +Create a workflow template and then submit the workflow template using the API. diff --git a/argo-workflows/getting-started/assets/hello-workflow.yaml b/argo-workflows/getting-started/assets/hello-workflow.yaml index 3d05a39..cbe8669 100644 --- a/argo-workflows/getting-started/assets/hello-workflow.yaml +++ b/argo-workflows/getting-started/assets/hello-workflow.yaml @@ -8,5 +8,6 @@ spec: templates: - name: main container: - image: docker/whalesay - command: ["cowsay"] + image: busybox + command: ["echo"] + args: ["hello world"] diff --git a/argo-workflows/getting-started/ui.md b/argo-workflows/getting-started/ui.md index 79bb337..6652f27 100644 --- a/argo-workflows/getting-started/ui.md +++ b/argo-workflows/getting-started/ui.md @@ -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: diff --git a/argo-workflows/getting-started/workflow.md b/argo-workflows/getting-started/workflow.md index 4390169..7c99343 100644 --- a/argo-workflows/getting-started/workflow.md +++ b/argo-workflows/getting-started/workflow.md @@ -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. diff --git a/argo-workflows/inputs-and-outputs/artifacts.md b/argo-workflows/inputs-and-outputs/artifacts.md index 4140be4..294c4a0 100644 --- a/argo-workflows/inputs-and-outputs/artifacts.md +++ b/argo-workflows/inputs-and-outputs/artifacts.md @@ -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 @@ -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" ] ``` diff --git a/argo-workflows/inputs-and-outputs/assets/artifacts-workflow.yaml b/argo-workflows/inputs-and-outputs/assets/artifacts-workflow.yaml index b9e17c6..1441a8b 100644 --- a/argo-workflows/inputs-and-outputs/assets/artifacts-workflow.yaml +++ b/argo-workflows/inputs-and-outputs/assets/artifacts-workflow.yaml @@ -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 @@ -35,6 +35,6 @@ spec: - name: message path: /tmp/message container: - image: docker/whalesay + image: busybox command: [sh, -c] args: ["cat /tmp/message"] diff --git a/argo-workflows/inputs-and-outputs/assets/input-parameters-workflow.yaml b/argo-workflows/inputs-and-outputs/assets/input-parameters-workflow.yaml index 42835d7..1c21dfd 100644 --- a/argo-workflows/inputs-and-outputs/assets/input-parameters-workflow.yaml +++ b/argo-workflows/inputs-and-outputs/assets/input-parameters-workflow.yaml @@ -14,6 +14,6 @@ spec: parameters: - name: message container: - image: docker/whalesay - command: [cowsay] + image: busybox + command: [echo] args: ["{{inputs.parameters.message}}"] diff --git a/argo-workflows/inputs-and-outputs/assets/parameters-workflow.yaml b/argo-workflows/inputs-and-outputs/assets/parameters-workflow.yaml index 3ca20f6..648c4ca 100644 --- a/argo-workflows/inputs-and-outputs/assets/parameters-workflow.yaml +++ b/argo-workflows/inputs-and-outputs/assets/parameters-workflow.yaml @@ -9,7 +9,7 @@ spec: dag: tasks: - name: generate-parameter - template: whalesay + template: echo - name: consume-parameter template: print-message dependencies: @@ -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: @@ -35,6 +35,6 @@ spec: parameters: - name: message container: - image: docker/whalesay - command: [cowsay] + image: busybox + command: [echo] args: ["{{inputs.parameters.message}}"] diff --git a/argo-workflows/inputs-and-outputs/parameters.md b/argo-workflows/inputs-and-outputs/parameters.md index dcff211..c0d12e4 100644 --- a/argo-workflows/inputs-and-outputs/parameters.md +++ b/argo-workflows/inputs-and-outputs/parameters.md @@ -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}}" ] ``` @@ -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 @@ -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: @@ -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: @@ -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 diff --git a/argo-workflows/install-using-helm/ui.md b/argo-workflows/install-using-helm/ui.md index 4218ccd..004a9c0 100644 --- a/argo-workflows/install-using-helm/ui.md +++ b/argo-workflows/install-using-helm/ui.md @@ -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: diff --git a/argo-workflows/reuse/assets/hello-workflowtemplate.yaml b/argo-workflows/reuse/assets/hello-workflowtemplate.yaml index 9fb861f..d904c99 100644 --- a/argo-workflows/reuse/assets/hello-workflowtemplate.yaml +++ b/argo-workflows/reuse/assets/hello-workflowtemplate.yaml @@ -7,5 +7,6 @@ spec: templates: - name: main container: - image: docker/whalesay - command: [cowsay] + image: busybox + command: [echo] + args: ["hello world"] diff --git a/argo-workflows/reuse/cron-workflows.md b/argo-workflows/reuse/cron-workflows.md index bcf8f4d..0a9c59e 100644 --- a/argo-workflows/reuse/cron-workflows.md +++ b/argo-workflows/reuse/cron-workflows.md @@ -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. diff --git a/argo-workflows/reuse/workflow-templates.md b/argo-workflows/reuse/workflow-templates.md index 4f13d68..bcecd38 100644 --- a/argo-workflows/reuse/workflow-templates.md +++ b/argo-workflows/reuse/workflow-templates.md @@ -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: diff --git a/argo-workflows/templates/assets/container-workflow.yaml b/argo-workflows/templates/assets/container-workflow.yaml index dac60f6..a375989 100644 --- a/argo-workflows/templates/assets/container-workflow.yaml +++ b/argo-workflows/templates/assets/container-workflow.yaml @@ -7,6 +7,6 @@ spec: templates: - name: main container: - image: docker/whalesay - command: [cowsay] + image: busybox + command: [echo] args: ["hello world"] diff --git a/argo-workflows/templates/assets/dag-workflow.yaml b/argo-workflows/templates/assets/dag-workflow.yaml index f607c31..f34fd85 100644 --- a/argo-workflows/templates/assets/dag-workflow.yaml +++ b/argo-workflows/templates/assets/dag-workflow.yaml @@ -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"] diff --git a/argo-workflows/templates/assets/exit-handler-workflow.yaml b/argo-workflows/templates/assets/exit-handler-workflow.yaml index 58f8776..12b3aed 100644 --- a/argo-workflows/templates/assets/exit-handler-workflow.yaml +++ b/argo-workflows/templates/assets/exit-handler-workflow.yaml @@ -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!"] diff --git a/argo-workflows/templates/assets/template-tag-workflow.yaml b/argo-workflows/templates/assets/template-tag-workflow.yaml index a0f1967..58ec707 100644 --- a/argo-workflows/templates/assets/template-tag-workflow.yaml +++ b/argo-workflows/templates/assets/template-tag-workflow.yaml @@ -7,6 +7,6 @@ spec: templates: - name: main container: - image: docker/whalesay - command: [cowsay] + image: busybox + command: [echo] args: ["hello {{workflow.name}}"] diff --git a/argo-workflows/templates/assets/with-items-workflow.yaml b/argo-workflows/templates/assets/with-items-workflow.yaml index 3ae4d36..503f20b 100644 --- a/argo-workflows/templates/assets/with-items-workflow.yaml +++ b/argo-workflows/templates/assets/with-items-workflow.yaml @@ -9,7 +9,7 @@ spec: dag: tasks: - name: print-message - template: whalesay + template: echo arguments: parameters: - name: message @@ -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}}"] diff --git a/argo-workflows/templates/assets/with-sequence-workflow.yaml b/argo-workflows/templates/assets/with-sequence-workflow.yaml index 5cbde73..a45dc13 100644 --- a/argo-workflows/templates/assets/with-sequence-workflow.yaml +++ b/argo-workflows/templates/assets/with-sequence-workflow.yaml @@ -9,7 +9,7 @@ spec: dag: tasks: - name: print-message - template: whalesay + template: echo arguments: parameters: - name: message @@ -17,11 +17,11 @@ spec: 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}}"] diff --git a/argo-workflows/templates/container.md b/argo-workflows/templates/container.md index fe8c216..7a75757 100644 --- a/argo-workflows/templates/container.md +++ b/argo-workflows/templates/container.md @@ -10,8 +10,8 @@ spec: templates: - name: main container: - image: docker/whalesay - command: [cowsay] + image: busybox + command: [echo] args: ["hello world"] ``` diff --git a/argo-workflows/templates/dag.md b/argo-workflows/templates/dag.md index 3713ffc..d1efc26 100644 --- a/argo-workflows/templates/dag.md +++ b/argo-workflows/templates/dag.md @@ -13,15 +13,15 @@ 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" ] ``` @@ -29,9 +29,9 @@ spec: In this example, we have two templates: * The "main" template is our new DAG. -* The "whalesay" template is the same template as in the container example. +* The "echo" template is the same template as in the container example. -The DAG has two tasks: "a" and "b". Both run the "whalesay" template, but as "b" depends on "a", it won't start until " +The DAG has two tasks: "a" and "b". Both run the "echo" template, but as "b" depends on "a", it won't start until " a" has completed successfully. Let's run the workflow: @@ -43,8 +43,8 @@ You should see something like: ```bash STEP TEMPLATE PODNAME DURATION MESSAGE ✔ dag-shxn5 main - ├─✔ a whalesay dag-shxn5-289972251 6s - └─✔ b whalesay dag-shxn5-306749870 6s + ├─✔ a echo dag-shxn5-289972251 6s + └─✔ b echo dag-shxn5-306749870 6s ``` Did you see how `b` did not start until `a` had completed? diff --git a/argo-workflows/templates/exit-handler.md b/argo-workflows/templates/exit-handler.md index 554bb8d..29fc230 100644 --- a/argo-workflows/templates/exit-handler.md +++ b/argo-workflows/templates/exit-handler.md @@ -5,7 +5,7 @@ using `onExit`: dag: tasks: - name: a - template: whalesay + template: echo onExit: tidy-up ``` @@ -24,7 +24,7 @@ You should see: ```bash STEP TEMPLATE PODNAME DURATION MESSAGE ✔ exit-handler-plvg7 main - ├─✔ a whalesay exit-handler-plvg7-1651124468 5s + ├─✔ a echo exit-handler-plvg7-1651124468 5s └─✔ a.onExit tidy-up exit-handler-plvg7-3635807335 6s ``` diff --git a/argo-workflows/templates/loops.md b/argo-workflows/templates/loops.md index ab811be..65c80a7 100644 --- a/argo-workflows/templates/loops.md +++ b/argo-workflows/templates/loops.md @@ -9,7 +9,7 @@ A DAG allows you to loop over a number of items using `withItems`: dag: tasks: - name: print-message - template: whalesay + template: echo arguments: parameters: - name: message @@ -28,8 +28,8 @@ You should see something like: ```bash STEP TEMPLATE PODNAME DURATION MESSAGE ✔ with-items-4qzg9 main - ├─✔ print-message(0:hello world) whalesay with-items-4qzg9-465751898 7s - └─✔ print-message(1:goodbye world) whalesay with-items-4qzg9-2410280706 5s + ├─✔ print-message(0:hello world) echo with-items-4qzg9-465751898 7s + └─✔ print-message(1:goodbye world) echo with-items-4qzg9-2410280706 5s ``` Notice how the two items ran at the same time. @@ -42,7 +42,7 @@ You can also loop over a sequence of numbers using `withSequence`: dag: tasks: - name: print-message - template: whalesay + template: echo arguments: parameters: - name: message @@ -58,11 +58,11 @@ As usual, run it: ```bash STEP TEMPLATE PODNAME DURATION MESSAGE ✔ with-sequence-8nrp5 main - ├─✔ print-message(0:0) whalesay with-sequence-8nrp5-3678575801 9s - ├─✔ print-message(1:1) whalesay with-sequence-8nrp5-1828425621 7s - ├─✔ print-message(2:2) whalesay with-sequence-8nrp5-1644772305 13s - ├─✔ print-message(3:3) whalesay with-sequence-8nrp5-3766794981 15s - └─✔ print-message(4:4) whalesay with-sequence-8nrp5-361941985 11s + ├─✔ print-message(0:0) echo with-sequence-8nrp5-3678575801 9s + ├─✔ print-message(1:1) echo with-sequence-8nrp5-1828425621 7s + ├─✔ print-message(2:2) echo with-sequence-8nrp5-1644772305 13s + ├─✔ print-message(3:3) echo with-sequence-8nrp5-3766794981 15s + └─✔ print-message(4:4) echo with-sequence-8nrp5-361941985 11s ``` See how 5 pods were run at the same time, and that their names have the item value in them, zero-indexed? diff --git a/argo-workflows/templates/template-tags.md b/argo-workflows/templates/template-tags.md index ba7b8a0..5097fe2 100644 --- a/argo-workflows/templates/template-tags.md +++ b/argo-workflows/templates/template-tags.md @@ -6,8 +6,8 @@ What tags are available to use depends on the template type, and there are a num ```yaml - name: main container: - image: docker/whalesay - command: [ cowsay ] + image: busybox + command: [ echo ] args: [ "hello {{workflow.name}}" ] ``` @@ -26,20 +26,7 @@ You can see the output by running You should see something like: ```bash - __________________________ -< hello template-tag-kqpc6 > - -------------------------- - \ - \ - \ - ## . - ## ## ## == - ## ## ## ## === - /""""""""""""""""___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\______/ +hello template-tag-kqpc6 ``` There are many more different tags, you can [read more about template tags in the docs](https://argoproj.github.io/argo-workflows/variables/). diff --git a/config/argo-events/minio-sensor.yaml b/config/argo-events/minio-sensor.yaml index 2698834..6d0fb13 100644 --- a/config/argo-events/minio-sensor.yaml +++ b/config/argo-events/minio-sensor.yaml @@ -20,21 +20,21 @@ spec: generateName: artifact-workflow- namespace: argo spec: - entrypoint: whalesay + entrypoint: echo arguments: parameters: - name: message # the value will get overridden by event payload from test-dep value: THIS_WILL_BE_REPLACED templates: - - name: whalesay + - name: echo inputs: parameters: - name: message container: command: - - cowsay - image: docker/whalesay:latest + - echo + image: busybox args: ["{{inputs.parameters.message}}"] # The container args from the workflow are overridden by the s3 notification key parameters: diff --git a/config/argo-workflows/canary-workflow.yaml b/config/argo-workflows/canary-workflow.yaml index 252a070..d83e9c9 100644 --- a/config/argo-workflows/canary-workflow.yaml +++ b/config/argo-workflows/canary-workflow.yaml @@ -9,5 +9,6 @@ spec: templates: - name: main container: - image: docker/whalesay - command: ["cowsay"] + image: busybox + command: ["echo"] + args: ["hello world"]