-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremove_platform.sh
More file actions
30 lines (24 loc) · 956 Bytes
/
remove_platform.sh
File metadata and controls
30 lines (24 loc) · 956 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
#!/bin/bash -e
# shellcheck disable=SC1091
source .pretty_print
print_bred "WARNING: This script will completely wipe out your RapidFort deployment."
print_bred "WARNING: All data will be will be deleted from your VM and will not be recoverable."
read -p "Do you want to remove the RapidFort platform and all data? (yes/no)" GO_AHEAD
# Convert input to lowercase
GO_AHEAD=$(echo "$GO_AHEAD" | tr '[:upper:]' '[:lower:]')
# Check the input
if [[ "$GO_AHEAD" == "yes" ]]; then
print_bgreen "Proceeding with removal..."
print_bgreen "Removing Helm Chart"
if ! helm uninstall rapidfort --ignore-not-found; then
print_bred "Removing Helm Chart failed"
fi
print_bgreen "Removing Kind Cluster"
if ! kind delete cluster --name rapidfort-platform; then
print_bred "Removing Kind cluster failed"
fi
elif [[ "$GO_AHEAD" == "no" ]]; then
print_bred "Aborting the removal."
else
print_bred "Invalid input. Please enter 'yes' or 'no'."
fi