-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: Alex Collins <alex_collins@intuit.com>
- Loading branch information
Showing
4 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
name: pod-gc-strategy | ||
spec: | ||
entrypoint: pod-gc-strategy | ||
podGC: | ||
# Pod GC strategy must be one of the following: | ||
# * OnPodCompletion - delete pods immediately when pod is completed (including errors/failures) | ||
# * OnPodSuccess - delete pods immediately when pod is successful | ||
# * OnWorkflowCompletion - delete pods when workflow is completed | ||
# * OnWorkflowSuccess - delete pods when workflow is successful | ||
strategy: "OnWorkflowCompletion" | ||
|
||
templates: | ||
- name: pod-gc-strategy | ||
steps: | ||
- - name: fail | ||
template: fail | ||
- name: succeed | ||
template: succeed | ||
|
||
- name: fail | ||
container: | ||
image: alpine:3.7 | ||
command: [sh, -c] | ||
args: ["exit 1"] | ||
|
||
- name: succeed | ||
container: | ||
image: alpine:3.7 | ||
command: [sh, -c] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters