forked from yard-turkey/aws-s3-provisioner
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdown.sh
More file actions
executable file
·33 lines (25 loc) · 768 Bytes
/
down.sh
File metadata and controls
executable file
·33 lines (25 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
cd "$(dirname "$0")/.." || exit
keep=false
if [ "$1" == "--keep" ]; then
keep=true
shift
fi
FIELD=${1:-green}field
if [ "$FIELD" != "greenfield" ] && [ "$FIELD" != "brownfield" ]; then
echo "usage: down.sh [--keep] [green|brown]"
exit 1
fi
# Clean up app
kubectl delete -f "examples/$FIELD/photo.yaml"
kubectl delete -f "examples/$FIELD/storageclass.yaml"
if $keep; then
exit 0
fi
# Kill provisioner
pgrep -f "alsologtostderr" | xargs --no-run-if-empty kill
# Undo object setup
kubectl delete -f examples/owner-secret.yaml
kubectl delete -f examples/cloudian-s3-provisioner-dev.yaml
kubectl delete -f crds/apiextensions-v1/objectbucket.io_objectbuckets.yaml
kubectl delete -f crds/apiextensions-v1/objectbucket.io_objectbucketclaims.yaml