Replies: 1 comment
-
Yes it's possible using apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: pvc-delete-on-fail-workflow
namespace: argo
spec:
templates:
- name: main-task
inputs: {}
outputs: {}
metadata: {}
container:
name: ''
image: alpine
command:
- sh
- '-c'
args:
- |
exit 1 # Simulate workflow failure
resources: {}
volumeMounts: # Mounts the volume
- name: workdir
mountPath: /mnt/vol
entrypoint: main-task
arguments: {}
volumeClaimTemplates: # Creates PersistentVolumeClaim
- metadata:
name: workdir
creationTimestamp: null
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
status: {}
volumeClaimGC: # Garbage collection for volume claims
strategy: OnWorkflowCompletion # Triggers on both workflow success or failure |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Like in topic, how can I force to delete PVC even when workflow fail?
We're trying to use autoscaling for our GKE cluster, but we can not set it up because Google is arguing about mounted PVC volumes. argoworkflows is not deleting not used PVC from failed workflows. Is it possible to force them to be deleted even when workflow fail?
Beta Was this translation helpful? Give feedback.
All reactions