Skip to content

Instantly share code, notes, and snippets.

@xubofei1983
Created February 14, 2019 23:37
Show Gist options
  • Save xubofei1983/63a057f0d8ef90b6e14ed93e09ba5b98 to your computer and use it in GitHub Desktop.
Save xubofei1983/63a057f0d8ef90b6e14ed93e09ba5b98 to your computer and use it in GitHub Desktop.
# This example demonstrates the use of retries with steps.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: retry-with-dags-
spec:
entrypoint: retry-with-dags
templates:
- name: retry-with-dags
dag:
tasks:
- name: hello1
template: random
- name: hello2
template: random
- name: hello3
template: random
- name: random
retryStrategy:
limit: 10
container:
image: python:alpine3.6
command: [python, -c]
# fail with a 33% probability
args: ["import random; import sys; exit_code = random.choice([0, 0, 1]); sys.exit(exit_code)"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment