Argo workflow suspend timeout if not approved and abort the workflow #8365
-
Hello, apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: suspend-template-
spec:
entrypoint: suspend
templates:
- name: suspend
steps:
- - name: build
template: whalesay
- - name: approve
template: approve
- - name: release
template: whalesay
- name: approve
suspend:
timeout: "1h"
abort: yes
- name: whalesay
container:
image: docker/whalesay
command: [cowsay]
args: ["hello world"] Can someone please help me with the same ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Were you able to find a work around for this? |
Beta Was this translation helpful? Give feedback.
-
@katylava - name: approval
suspend:
duration: "1h"
inputs:
parameters:
- name: approve
description: "The options to show on the dropdown in Argo UI."
default: "NO"
enum:
- "YES"
- "NO"
outputs:
parameters:
- name: approve
valueFrom:
supplied: {} Failure step. - name: fail-workflow
dependencies:
- approval
when: >-
( '{{tasks.approval.outputs.parameters.approve}}' != 'YES' ) |
Beta Was this translation helpful? Give feedback.
-
Hey all - I see that this is using the Intermediate Parameters functionality. My question is whether or not it's possible to also pass this inputs in as part of the CLI? |
Beta Was this translation helpful? Give feedback.
@katylava
I find out a workaround for my workflow.
whenever someone approves the workflow, it provides input
approve
asYES
. suspend step wait for 1 hour if no one provides the approval it process with a default value asNO
The next step purely depends on the output of this step. if it is
NO
then abort job will run, it will fail the workflow with an error message.If someone provides
YES
then will go as expected.