forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gc-ttl.yaml
21 lines (20 loc) · 882 Bytes
/
gc-ttl.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This example shows the ability to automatically delete workflows after a specified time period
# after the workflow completes. The TTLStrategy sets the strategy for how long workflows that are
# successful, not successful, or completed should live. The former ttlSecondsAfterFinished will be
# deprecated and will be replaced with TTLStrategy.SecondsAfterCompleted.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: gc-ttl-
spec:
ttlStrategy:
secondsAfterCompletion: 10 # Time to live after workflow is completed, replaces ttlSecondsAfterFinished
secondsAfterSuccess: 5 # Time to live after workflow is successful
secondsAfterFailure: 5 # Time to live after workflow fails
entrypoint: whalesay
templates:
- name: whalesay
container:
image: docker/whalesay:latest
command: [cowsay]
args: ["hello world"]