-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove all pods before cleanup to release volumes mounted with rshare…
…d propagation Fixes #96
- Loading branch information
Showing
3 changed files
with
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- run: make debug | ||
- run: make | ||
- run: make clean |
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,21 @@ | ||
#!/bin/sh -xe | ||
|
||
# Remove all Applications to prevent ArgoCD to reconcile | ||
kubectl -n argocd delete application --all | ||
|
||
# Remove all Operators to ensure that it does not redeploy stuffs | ||
kubectl -n cluster-operators delete deployments --all | ||
|
||
# Remove all pods to release volume mounted with rshared propagation | ||
kubectl delete daemonsets --all --all-namespaces | ||
kubectl delete statefulsets --all --all-namespaces | ||
kubectl delete deployments --all --all-namespaces | ||
kubectl delete cronjobs --all --all-namespaces | ||
kubectl delete jobs --all --all-namespaces | ||
kubectl delete horizontalpodautoscaler --all --all-namespaces | ||
kubectl delete service --all --all-namespaces | ||
|
||
while test "$(kubectl get pods --all-namespaces | wc -l)" -ne 0; do | ||
echo Waiting for destruction of all pods | ||
sleep 3 | ||
done |