Skip to content

Commit

Permalink
Backup and delete DBversions in --purge flag (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
the-redback authored and tamalsaha committed Aug 3, 2018
1 parent 6795776 commit 7d2970f
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions hack/deploy/kubedb.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
#!/bin/bash
set -eou pipefail

crds=(elasticsearches memcacheds mongodbs mysqls postgreses redises etcds snapshots dormantdatabases)
crds=(
dormantdatabases
elasticsearches
elasticsearchversions
etcds
etcdversions
memcacheds
memcachedversions
mongodbs
mongodbversions
mysqls
mysqlversions
postgreses
postgresversions
redises
redisversions
snapshots
)
apiServices=(v1alpha1.validators v1alpha1.mutators)

echo "checking kubeconfig context"
Expand Down Expand Up @@ -263,8 +280,6 @@ if [ "$KUBEDB_UNINSTALL" -eq 1 ]; then
kubectl delete rolebindings -l app=kubedb --namespace $KUBEDB_NAMESPACE
kubectl delete role -l app=kubedb --namespace $KUBEDB_NAMESPACE

kubectl delete postgresversion -l app=kubedb

echo "waiting for kubedb operator pod to stop running"
for (( ; ; )); do
pods=($(kubectl get pods --all-namespaces -l app=kubedb -o jsonpath='{range .items[*]}{.metadata.name} {end}'))
Expand Down

0 comments on commit 7d2970f

Please sign in to comment.