Timeout in exit handler #13657
Timeout in exit handler
#13657
-
Hi, apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: exit-handler-with-param-
labels:
workflows.argoproj.io/test: "true"
annotations:
workflows.argoproj.io/description: |
onExitTemplate enables workflow to pass the arguments (parameters/Artifacts) to exit handler template.
workflows.argoproj.io/version: ">= 3.1.0"
spec:
entrypoint: main
onExit: workflow-level-exit-hanlder
templates:
- name: main
dag:
tasks:
- name: task-1
template: output
hooks:
exit:
template: exit
arguments:
parameters:
- name: message
value: "{{tasks.task-1.message}}"
- name: output
container:
image: python:alpine3.6
command: [sh, -c]
args: ["echo -n hello world > /tmp/hello_world.txt"]
outputs:
parameters:
- name: result
valueFrom:
default: "Foobar"
path: /tmp/hello_world.txt
- name: exit
inputs:
parameters:
- name: error_message
script:
image: python:alpine3.6
command: [ python ]
source: |
print("{{inputs.parameters.error_message}}")
- name: workflow-level-exit-hanlder
dag:
tasks:
- name: exite-handler-at-workflow
arguments:
parameters:
name: workflow_status
value: "{{ `{{ workflow.status }}` }}"` |
Beta Was this translation helpful? Give feedback.
Answered by
agilgur5
Sep 24, 2024
Replies: 1 comment
-
You can set |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
agilgur5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can set
activeDeadlineSeconds
per template, per the "Timeouts" doc page