-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Uninstall script with option to retain the persistent volume claim
Signed-off-by: Patrick Kremer <[email protected]>
- Loading branch information
Patrick Kremer
committed
Oct 29, 2021
1 parent
5f54d9b
commit c65d220
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
kubectl delete -n pacman -f security/rbac.yaml | ||
kubectl delete -n pacman -f security/secret.yaml | ||
kubectl delete -n pacman -f deployments/mongo-deployment.yaml | ||
kubectl delete -n pacman -f deployments/pacman-deployment.yaml | ||
kubectl delete -n pacman -f services/mongo-service.yaml | ||
kubectl delete -n pacman -f services/pacman-service.yaml | ||
|
||
if [[ $# -gt 0 && "$1" == "keeppvc" ]] | ||
then | ||
echo "Keeping namespace and persistent volume claim" | ||
else | ||
kubectl delete -n pacman -f persistentvolumeclaim/mongo-pvc.yaml | ||
kubectl delete namespace pacman | ||
fi |