Skip to content

Commit

Permalink
Stash V1beta1 E2E test for Deployment (#710)
Browse files Browse the repository at this point in the history
xref: stashed/stash#707

Tasks:
- [x] Install/Uninstall Stash Operator using deployment script in test

- [x] Workload backup and restore for deployment
  • Loading branch information
suaas21 authored and tamalsaha committed Apr 10, 2019
1 parent 4fe737a commit e4c8740
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deploy/stash.sh
Original file line number Diff line number Diff line change
@@ -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 || {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e4c8740

Please sign in to comment.