diff --git a/install/k8s/contiv.yaml b/install/k8s/contiv.yaml index 886f844..7066509 100644 --- a/install/k8s/contiv.yaml +++ b/install/k8s/contiv.yaml @@ -28,6 +28,7 @@ spec: image: contiv/netplugin:__CONTIV_VERSION__ args: - -pkubernetes + - -x env: - name: VLAN_IF value: __VLAN_IF__ diff --git a/install/k8s/uninstall.sh b/install/k8s/uninstall.sh index 9c1d19c..6b6b6cb 100755 --- a/install/k8s/uninstall.sh +++ b/install/k8s/uninstall.sh @@ -2,7 +2,7 @@ set -euo pipefail -if [ "$1" = "-h" ]; then +if [ "$#" -eq 1 ] && [ "$1" = "-h" ]; then echo "Usage: ./install/k8s/uninstall.sh to uninstall contiv" echo " ./install/k8s/uninstall.sh etcd-cleanup to uninstall contiv and cleanup contiv data" exit 1 @@ -13,9 +13,14 @@ kubectl delete secret aci.key -n kube-system # Delete Contiv pods kubectl delete -f .contiv.yaml -if [ "$1" = "etcd-cleanup" ]; then +if [ "$#" -eq 1 ] && [ "$1" = "etcd-cleanup" ]; then rm -rf /var/etcd/contiv-data fi # Re-creating the kube-dns deployment kubectl create -f kube-dns.yaml + +set -x +for p in $(ifconfig | grep vport | awk '{print $1}'); do + ip link delete $p type veth; +done