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 f76499d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 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
2 changes: 1 addition & 1 deletion install/k8s/install.sh
Expand Up @@ -245,7 +245,7 @@ cp ./netctl /usr/bin/
kubectl apply -f $contiv_yaml
if [ "$fwd_mode" = "routing" ]; then
sleep 60
./netctl --netmaster http://$netmaster:9999 global set --fwd-mode routing
netctl --netmaster http://$netmaster:9999 global set --fwd-mode routing
else
kubectl get deployment/kube-dns -n kube-system -o json > kube-dns.yaml
kubectl delete deployment/kube-dns -n kube-system
Expand Down
5 changes: 3 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,10 @@ 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

0 comments on commit f76499d

Please sign in to comment.