forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce podGC strategy for deleting completed/successful pods (argo…
- Loading branch information
Showing
11 changed files
with
258 additions
and
43 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,35 @@ | ||
# pod gc provides the ability to delete pods automatically without deleting the workflow | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: 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: OnPodSuccess | ||
|
||
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] | ||
args: ["exit 0"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.