-
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: PVC in wf.status should be reset when retrying workflow (#10685)
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
- Loading branch information
1 parent
9f1b68d
commit ec85683
Showing
3 changed files
with
67 additions
and
0 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,42 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
name: retry-with-recreated-pvc | ||
spec: | ||
volumeClaimGC: | ||
strategy: OnWorkflowCompletion | ||
entrypoint: volumes-pvc-example | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: workdir | ||
spec: | ||
accessModes: [ "ReadWriteOnce" ] | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
|
||
templates: | ||
- name: volumes-pvc-example | ||
steps: | ||
- - name: generate | ||
template: whalesay | ||
- - name: print | ||
template: print-message | ||
|
||
- name: whalesay | ||
container: | ||
image: argoproj/argosay:v2 | ||
command: [sh, -c] | ||
args: ["echo generating message in volume; cowsay hello world | tee /mnt/vol/hello_world.txt"] | ||
volumeMounts: | ||
- name: workdir | ||
mountPath: /mnt/vol | ||
|
||
- name: print-message | ||
container: | ||
image: argoproj/argosay:v2 | ||
command: [sh, -c] | ||
args: ["exit 1"] | ||
volumeMounts: | ||
- name: workdir | ||
mountPath: /mnt/vol |
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