Skip to content

Commit

Permalink
Merge pull request kubevirt#561 from cynepco3hahue/remove_kubevirt_re…
Browse files Browse the repository at this point in the history
…sources_from_all_namespaces

Improve removing traces from old deployments
  • Loading branch information
rmohr authored Nov 13, 2017
2 parents b079bc9 + 6d367d8 commit ab91477
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,18 @@ echo ""
echo ""

# Delete traces from old deployments
kubectl delete deployments --all
kubectl delete ds --all
kubectl delete pods --all
namespaces=(default kube-system)
for i in ${namespaces[@]}; do
kubectl -n ${i} delete deployment -l 'app'
kubectl -n ${i} delete services -l '!k8s-app'
kubectl -n ${i} delete pv --all
kubectl -n ${i} delete pvc --all
kubectl -n ${i} delete ds -l 'daemon'
kubectl -n ${i} delete crd --all
kubectl -n ${i} delete serviceaccounts -l 'name in (kubevirt, kubevirt-admin)'
kubectl -n ${i} delete clusterrolebinding -l 'name=kubevirt'
kubectl -n ${i} delete pods -l 'app'
done

# Deploy kubevirt
cluster/sync.sh
Expand Down

0 comments on commit ab91477

Please sign in to comment.