Skip to content

Commit

Permalink
chore: update kind k8s to 1.22 and remove pre 1.16 support
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Nov 3, 2021
1 parent d17d7e1 commit a648bfc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2,825 deletions.
1 change: 1 addition & 0 deletions dist/images/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN apt update && apt upgrade -y && apt install ca-certificates python3 hostname
rm -rf /var/lib/apt/lists/* && \
cd /usr/sbin && \
ln -sf /usr/sbin/iptables-legacy iptables && \
ln -sf /usr/sbin/ip6tables-legacy ip6tables && \
rm -rf /etc/localtime

RUN mkdir -p /var/run/openvswitch && \
Expand Down
10 changes: 9 additions & 1 deletion dist/images/cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/bin/bash
set -eu

kubectl delete --ignore-not-found ds kube-ovn-pinger -n kube-system
# ensure kube-ovn-pinger has been deleted
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
done

for subnet in $(kubectl get subnet -o name); do
kubectl patch "$subnet" --type='json' -p '[{"op": "replace", "path": "/metadata/finalizers", "value": []}]'
kubectl delete "$subnet"
Expand All @@ -17,7 +26,6 @@ done
sleep 5

# Delete Kube-OVN components
kubectl delete --ignore-not-found ds kube-ovn-pinger -n kube-system
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
Expand Down

0 comments on commit a648bfc

Please sign in to comment.