From ba577b678ee94c8fb35b14978d8ccd388ffc7cce Mon Sep 17 00:00:00 2001 From: David Hoese <david.hoese@ssec.wisc.edu> Date: Fri, 24 Jul 2020 14:55:49 -0500 Subject: [PATCH] Add kubectl delete to PVC creation when needed --- helpers/create_pvc.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/create_pvc.sh b/helpers/create_pvc.sh index 20e7dd9..94b662e 100755 --- a/helpers/create_pvc.sh +++ b/helpers/create_pvc.sh @@ -40,9 +40,9 @@ elif [[ $pvc_pending != "Pending" ]]; then echo "PVC already exists and is not pending. Manually 'helm uninstall' all bound pods" exit 2 else - echo "PVC exists but is pending, deleting..." -# kubectl $EXTRA_ARGS delete $pvc_name || fail "Could not delete existing PVC" + echo "PVC exists but is pending, deleting then recreating..." + kubectl $EXTRA_ARGS delete $pvc_name || fail "Could not delete existing PVC" fi -kubectl $EXTRA_ARGS replace -f $pvc_file \ No newline at end of file +kubectl $EXTRA_ARGS apply -f $pvc_file \ No newline at end of file -- GitLab