Skip to content

Commit

Permalink
fix cleanup order (#2792)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed May 16, 2023
1 parent 94e7463 commit cd4ff4f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dist/images/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ for oeip in $(kubectl get oeip -o name); do
kubectl delete --ignore-not-found $oeip
done

for vlan in $(kubectl get vlan -o name); do
kubectl delete --ignore-not-found $vlan
done

for pn in $(kubectl get provider-network -o name); do
kubectl delete --ignore-not-found $pn
done

set +e
for subnet in $(kubectl get subnet -o name); do
kubectl patch "$subnet" --type='json' -p '[{"op": "replace", "path": "/metadata/finalizers", "value": []}]'
Expand All @@ -73,6 +65,14 @@ for vpc in $(kubectl get vpc -o name); do
kubectl delete --ignore-not-found $vpc
done

for vlan in $(kubectl get vlan -o name); do
kubectl delete --ignore-not-found $vlan
done

for pn in $(kubectl get provider-network -o name); do
kubectl delete --ignore-not-found $pn
done

sleep 5

# Delete Kube-OVN components
Expand Down

0 comments on commit cd4ff4f

Please sign in to comment.