-
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.
fix: delete PVCs upon onExit error when OnWorkflowCompletion is enabl…
- Loading branch information
1 parent
1253f44
commit 17ea4bc
Showing
11 changed files
with
291 additions
and
10 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
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
33 changes: 33 additions & 0 deletions
33
test/e2e/testdata/workflow-template-invalid-entrypoint.yaml
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,33 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: workflow-template-invalid-entrypoint | ||
spec: | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: builddir | ||
spec: | ||
accessModes: [ "ReadWriteMany" ] | ||
resources: | ||
requests: | ||
storage: 1Mi | ||
volumeClaimGC: | ||
strategy: OnWorkflowCompletion | ||
entrypoint: whalesay | ||
onExit: notify | ||
templates: | ||
- name: whalesay | ||
container: | ||
image: 'argoproj/argosay:v2' | ||
command: | ||
- /argosay | ||
args: | ||
- echo | ||
- 'hello world' | ||
volumeMounts: | ||
- name: foo # <<< invalid since no volume `foo` | ||
- name: notify | ||
container: | ||
image: 'argoproj/argosay:v2' | ||
command: [sh, -c] | ||
args: ["exit 0"] |
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,33 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: workflow-template-invalid-onexit | ||
spec: | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: builddir | ||
spec: | ||
accessModes: [ "ReadWriteMany" ] | ||
resources: | ||
requests: | ||
storage: 1Mi | ||
volumeClaimGC: | ||
strategy: OnWorkflowCompletion | ||
entrypoint: whalesay | ||
onExit: notify | ||
templates: | ||
- name: whalesay | ||
container: | ||
image: 'argoproj/argosay:v2' | ||
command: | ||
- /argosay | ||
args: | ||
- echo | ||
- 'hello world' | ||
- name: notify | ||
container: | ||
image: 'argoproj/argosay:v2' | ||
command: [sh, -c] | ||
args: ["exit 0"] | ||
volumeMounts: | ||
- name: foo # <<< invalid since no volume `foo` |
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
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
29 changes: 29 additions & 0 deletions
29
workflow/controller/testdata/workflow-template-invalid-entrypoint.yaml
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,29 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: workflow-template-invalid-entrypoint | ||
namespace: argo | ||
spec: | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: builddir | ||
spec: | ||
accessModes: [ "ReadWriteMany" ] | ||
resources: | ||
requests: | ||
storage: 1Mi | ||
volumeClaimGC: | ||
strategy: OnWorkflowCompletion | ||
entrypoint: whalesay | ||
onExit: notify | ||
templates: | ||
- name: whalesay | ||
# note this is an invalid template | ||
- name: notify | ||
container: | ||
image: 'argoproj/argosay:v2' | ||
command: | ||
- /argosay | ||
args: | ||
- echo | ||
- 'hello world' |
29 changes: 29 additions & 0 deletions
29
workflow/controller/testdata/workflow-template-invalid-onexit.yaml
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,29 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: workflow-template-invalid-onexit | ||
namespace: argo | ||
spec: | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: builddir | ||
spec: | ||
accessModes: [ "ReadWriteMany" ] | ||
resources: | ||
requests: | ||
storage: 1Mi | ||
volumeClaimGC: | ||
strategy: OnWorkflowCompletion | ||
entrypoint: whalesay | ||
onExit: notify | ||
templates: | ||
- name: whalesay | ||
container: | ||
image: 'argoproj/argosay:v2' | ||
command: | ||
- /argosay | ||
args: | ||
- echo | ||
- 'hello world' | ||
- name: notify | ||
# note this is an invalid template |
Oops, something went wrong.