Skip to content

Commit

Permalink
Add reinit option to cleanup any existing ovs bridges
Browse files Browse the repository at this point in the history
Fixes contiv#61
  • Loading branch information
neelimamukiri committed Mar 7, 2017
1 parent 4780ce1 commit 6846770
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions install/k8s/contiv.yaml
Expand Up @@ -28,6 +28,7 @@ spec:
image: contiv/netplugin:__CONTIV_VERSION__
args:
- -pkubernetes
- -x
env:
- name: VLAN_IF
value: __VLAN_IF__
Expand Down
9 changes: 7 additions & 2 deletions install/k8s/uninstall.sh
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 6846770

Please sign in to comment.