diff --git a/chart/stash/templates/cleaner.yaml b/chart/stash/templates/cleaner.yaml index a5ad6a0a5..17ce94a8b 100644 --- a/chart/stash/templates/cleaner.yaml +++ b/chart/stash/templates/cleaner.yaml @@ -23,6 +23,10 @@ spec: command: - sh - -c - - "sleep 2; kubectl delete validatingwebhookconfigurations admission.stash.appscode.com || true; kubectl delete mutatingwebhookconfiguration admission.stash.appscode.com || true" + - "sleep 2; \ + kubectl delete validatingwebhookconfigurations admission.stash.appscode.com || true; \ + kubectl delete mutatingwebhookconfiguration admission.stash.appscode.com || true; \ + kubectl delete function update-status pvc-backup pvc-restore || true; \ + kubectl delete task pvc-backup pvc-restore" imagePullPolicy: {{ .Values.imagePullPolicy }} restartPolicy: Never diff --git a/deploy/stash.sh b/deploy/stash.sh index c8f30f3b6..38cb02bb6 100755 --- a/deploy/stash.sh +++ b/deploy/stash.sh @@ -351,8 +351,11 @@ if [ "$STASH_UNINSTALL" -eq 1 ]; then kubectl delete secret stash-apiserver-cert --namespace $PROMETHEUS_NAMESPACE || true # delete psp resources kubectl delete psp stash-operator-psp stash-backup-job stash-backupsession-cron stash-restore-job || true - # delete update-status function - kubectl delete function update-status || true + # delete default functions + kubectl delete function update-status pvc-backup pvc-restore || true + # delete default tasks + kubectl delete task pvc-backup pvc-restore || true + echo "waiting for stash operator pod to stop running" for (( ; ; )); do pods=($(kubectl get pods --namespace $STASH_NAMESPACE -l app=stash -o jsonpath='{range .items[*]}{.metadata.name} {end}'))