Skip to content

Commit

Permalink
cleanup.sh: wait for provier-networks to be deleted before deleting k…
Browse files Browse the repository at this point in the history
…ube-ovn-cni (#3006)
  • Loading branch information
zhangzujian committed Jul 7, 2023
1 parent 9304ae5 commit 18560c9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/build-x86-image.yaml
Expand Up @@ -968,10 +968,7 @@ jobs:
done
- name: Cleanup
run: |
if [ "${{ matrix.mode }}" != underlay ]; then
sh -x dist/images/cleanup.sh
fi
run: sh -x dist/images/cleanup.sh

kube-ovn-ic-conformance-e2e:
name: Kube-OVN IC Conformance E2E
Expand Down Expand Up @@ -1108,7 +1105,7 @@ jobs:
run: make kind-install-chart

- name: Cleanup
run: sh dist/images/cleanup.sh
run: sh -x dist/images/cleanup.sh

underlay-logical-gateway-installation-test:
name: Underlay Logical Gateway Installation Test
Expand Down Expand Up @@ -1144,7 +1141,7 @@ jobs:
run: make kind-install-underlay-logical-gateway-dual

- name: Cleanup
run: sh dist/images/cleanup.sh
run: sh -x dist/images/cleanup.sh

no-ovn-lb-test:
name: Disable OVN LB Test
Expand Down Expand Up @@ -1182,7 +1179,7 @@ jobs:
run: make kind-install

- name: Cleanup
run: sh dist/images/cleanup.sh
run: sh -x dist/images/cleanup.sh

no-np-test:
name: Disable Network Policy Test
Expand Down Expand Up @@ -1220,7 +1217,7 @@ jobs:
run: make kind-install

- name: Cleanup
run: sh dist/images/cleanup.sh
run: sh -x dist/images/cleanup.sh

lb-svc-e2e:
name: LB Service E2E
Expand Down Expand Up @@ -1535,7 +1532,7 @@ jobs:
path: installation-compatibility-test-ko-log.tar.gz

- name: Cleanup
run: sh dist/images/cleanup.sh
run: sh -x dist/images/cleanup.sh

cilium-chaining-e2e:
name: Cilium Chaining E2E
Expand Down Expand Up @@ -1642,7 +1639,7 @@ jobs:
path: cilium-chaining-e2e-ko-log.tar.gz

- name: Cleanup
run: sh dist/images/cleanup.sh
run: sh -x dist/images/cleanup.sh

kube-ovn-security-e2e:
name: Kube-OVN Security E2E
Expand Down Expand Up @@ -1757,7 +1754,7 @@ jobs:
path: kube-ovn-security-e2e-${{ matrix.ssl }}-${{ matrix.bind-local }}-${{ matrix.ip-family }}-ko-log.tar.gz

- name: Cleanup
run: sh dist/images/cleanup.sh
run: sh -x dist/images/cleanup.sh

push:
name: Push Images
Expand Down Expand Up @@ -1930,7 +1927,7 @@ jobs:
path: kube-ovn-submariner-conformance-e2e-ko-log.tar.gz

- name: Cleanup
run: sh dist/images/cleanup.sh
run: sh -x dist/images/cleanup.sh

iptables-vpc-nat-gw-conformance-e2e:
name: Iptables VPC NAT Gateway E2E
Expand Down
5 changes: 4 additions & 1 deletion dist/images/cleanup.sh
Expand Up @@ -81,9 +81,12 @@ done
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
kubectl delete --ignore-not-found svc kube-ovn-pinger kube-ovn-controller kube-ovn-cni kube-ovn-monitor -n kube-system
kubectl delete --ignore-not-found ds kube-ovn-cni -n kube-system
kubectl delete --ignore-not-found deploy kube-ovn-controller -n kube-system

# wait for provier-networks to be deleted before deleting kube-ovn-cni
sleep 5
kubectl delete --ignore-not-found ds kube-ovn-cni -n kube-system

# ensure kube-ovn-cni has been deleted
while :; do
if [ $(kubectl get pod --no-headers -n kube-system -l app=kube-ovn-cni | wc -l) -eq 0 ]; then
Expand Down

0 comments on commit 18560c9

Please sign in to comment.