Artem Silenkov b8719ff122 [app][calico][kubernetes] Enable calico networking in k8s application
- binaries and scripts updated to use calico networking

Co-Authored-By: ddovbii <ddovbii@mirantis.com>
Change-Id: I3187b9cc171aa15caa4912a665c642ab057b4eae
2016-09-20 14:21:15 +00:00

19 lines
395 B
Bash

#!/bin/bash
count=30
echo "Adding flannel configuration to etcd"
command=$( (/opt/bin/etcdctl set /coreos.com/network/config '{"Network":"10.200.0.0/16"}') 2>&1)
while [ $count -gt 0 ]; do
if [ "${command}" ]; then
echo "Flannel is configured on master node" >> /tmp/etcd.log
exit 0
fi
echo "Flannel configuration was not added. Reason: $command"
((count-- ))
sleep 5
done
exit 1