From e4c87404ee7b2ee18170fd27d511c559b8925113 Mon Sep 17 00:00:00 2001 From: Sayf Uddin Al Azad Sagor <33339455+suaas21@users.noreply.github.com> Date: Wed, 10 Apr 2019 16:11:50 +0600 Subject: [PATCH] Stash V1beta1 E2E test for Deployment (#710) xref: https://github.com/appscode/stash/issues/707 Tasks: - [x] Install/Uninstall Stash Operator using deployment script in test - [x] Workload backup and restore for deployment --- deploy/stash.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy/stash.sh b/deploy/stash.sh index f62186793..7519428bd 100755 --- a/deploy/stash.sh +++ b/deploy/stash.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eou pipefail -crds=(restics repositories recoveries) +crds=(restics repositories recoveries backupconfigurations backupsessions) echo "checking kubeconfig context" kubectl config current-context || { @@ -374,6 +374,10 @@ if [ "$STASH_UNINSTALL" -eq 1 ]; then for ((i = 0; i < $total; i += 2)); do name=${pairs[$i]} namespace=${pairs[$i + 1]} + + # remove finalizers + kubectl patch ${crd} $name -n $namespace -p '{"metadata":{"finalizers":[]}}' --type=merge || true + # delete crd object echo "deleting ${crd} $namespace/$name" kubectl delete ${crd}.stash.appscode.com $name -n $namespace