forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathartifact-gc-workflow.yaml
36 lines (36 loc) · 1.23 KB
/
artifact-gc-workflow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This example shows how you can configure Artifact Garbage Collection for your Workflow.
# Here there are two artifacts - one is automatically deleted when the Workflow completes, and the other
# is deleted when the Workflow gets deleted.
# In this case, "OnWorkflowDeletion" is defined for all artifacts by default, but the "on-completion" artifact
# overrides that default strategy.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: artifact-gc-
spec:
entrypoint: main
artifactGC:
strategy: OnWorkflowDeletion # the overall strategy, which can be overridden
templates:
- name: main
container:
image: argoproj/argosay:v2
command:
- sh
- -c
args:
- |
echo "hello world" > /tmp/on-completion.txt
echo "hello world" > /tmp/on-deletion.txt
outputs:
artifacts:
- name: on-completion
path: /tmp/on-completion.txt
s3:
key: on-completion.txt
artifactGC:
strategy: OnWorkflowCompletion # overriding the default strategy for this artifact
- name: on-deletion
path: /tmp/on-deletion.txt
s3:
key: on-deletion.txt