-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #223 from xwu2git/master
accumulative fixes
- Loading branch information
Showing
3 changed files
with
5 additions
and
15 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
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 |
---|---|---|
@@ -1,20 +1,10 @@ | ||
#!/bin/bash -e | ||
#!/bin/bash | ||
|
||
DIR=$(dirname $(readlink -f "$0")) | ||
|
||
# delete all pods, services and deployments | ||
for yaml in $(find "${DIR}" -maxdepth 1 \( -name "*.yaml" ! -name "*-pv.yaml" ! -name "*-pvc.yaml" \) -print); do | ||
kubectl delete -f "$yaml" --ignore-not-found=true 2>/dev/null || echo -n "" | ||
done | ||
|
||
# delete all pvcs | ||
for yaml in $(find "${DIR}" -maxdepth 1 -name "*-pvc.yaml" -print); do | ||
kubectl delete -f "$yaml" --ignore-not-found=true 2>/dev/null || echo -n "" | ||
done | ||
|
||
# delete pvs and scs | ||
for yaml in $(find "${DIR}" -maxdepth 1 -name "*-pv.yaml" -print); do | ||
kubectl delete -f "$yaml" --ignore-not-found=true 2>/dev/null || echo -n "" | ||
for yaml in $(find "${DIR}" -maxdepth 1 -name "*.yaml" -print); do | ||
kubectl delete --wait=false -f "$yaml" --ignore-not-found=true 2>/dev/null | ||
done | ||
|
||
kubectl delete secret self-signed-certificate 2> /dev/null || echo -n "" |