Skip to content

Commit

Permalink
accelerate cleanup (#2376)
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Feb 24, 2023
1 parent 50df652 commit db9f927
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions dist/images/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ while :; do
if [ $(kubectl get pod --no-headers -n kube-system -l app=kube-ovn-pinger | wc -l) -eq 0 ]; then
break
fi
sleep 5
sleep 1
done

set +e
Expand Down Expand Up @@ -74,9 +74,6 @@ for oeip in $(kubectl get oeip -o name); do
kubectl delete --ignore-not-found $oeip
done


sleep 5

# Delete Kube-OVN components
kubectl delete --ignore-not-found deploy kube-ovn-monitor -n kube-system
kubectl delete --ignore-not-found cm ovn-config ovn-ic-config ovn-external-gw-config -n kube-system
Expand All @@ -89,7 +86,7 @@ while :; do
if [ $(kubectl get pod --no-headers -n kube-system -l app=kube-ovn-cni | wc -l) -eq 0 ]; then
break
fi
sleep 5
sleep 1
done

for pod in $(kubectl get pod -n kube-system -l app=ovs -o 'jsonpath={.items[?(@.status.phase=="Running")].metadata.name}'); do
Expand Down Expand Up @@ -147,7 +144,7 @@ kubectl annotate ns --all ovn.kubernetes.io/allocated-

# ensure kube-ovn components have been deleted
while :; do
sleep 5
sleep 1
if [ $(kubectl get pod --no-headers -n kube-system -l component=network | wc -l) -eq 0 ]; then
break
fi
Expand Down

0 comments on commit db9f927

Please sign in to comment.