use flanneld sysconfig for etcd url
This commit is contained in:
parent
6cf8b904b5
commit
cb51ae97b7
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /etc/sysconfig/heat-params
|
||||
. /etc/sysconfig/flanneld
|
||||
|
||||
if [ "$FLANNEL_USE_VXLAN" == "true" ]; then
|
||||
use_vxlan=1
|
||||
|
@ -19,15 +20,14 @@ cat > /etc/sysconfig/flannel-network.json <<EOF
|
|||
EOF
|
||||
|
||||
# wait for etcd to become active (we will need it to push the flanneld config)
|
||||
while ! curl -sf http://localhost:4001/v2/keys/; do
|
||||
while ! curl -sf -o /dev/null $FLANNEL_ETCD/v2/keys/; do
|
||||
echo "waiting for etcd"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# put the flannel config in etcd
|
||||
echo "creating flanneld config in etcd"
|
||||
curl -sf -L http://localhost:4001/v2/keys/coreos.com/network/config \
|
||||
curl -sf -L $FLANNEL_ETCD/v2/keys/coreos.com/network/config \
|
||||
-X PUT \
|
||||
--data-urlencode value@/etc/sysconfig/flannel-network.json
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue