From 6b830cf229c58dbdd5325619f1c42f669227312a Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Wed, 9 Dec 2015 11:35:38 -0800 Subject: [PATCH] Fix a couple flannel invocations I missed --- cluster/centos/config-build.sh | 2 +- cluster/centos/node/scripts/flannel.sh | 2 +- cluster/saltbase/salt/flannel/initd | 2 +- cluster/ubuntu/download-release.sh | 4 ++-- cluster/ubuntu/util.sh | 1 + cluster/vagrant/provision-network-master.sh | 2 +- cluster/vagrant/provision-network-node.sh | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cluster/centos/config-build.sh b/cluster/centos/config-build.sh index 60ee0f47c9b13..c7a1434fce80e 100755 --- a/cluster/centos/config-build.sh +++ b/cluster/centos/config-build.sh @@ -20,7 +20,7 @@ RELEASES_DIR=${RELEASES_DIR:-/tmp/downloads} # Define flannel version to use. -FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.3"} +FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"} # Define etcd version to use. ETCD_VERSION=${ETCD_VERSION:-"2.2.1"} diff --git a/cluster/centos/node/scripts/flannel.sh b/cluster/centos/node/scripts/flannel.sh index fff6dc718d56d..f92601d9e1bc8 100755 --- a/cluster/centos/node/scripts/flannel.sh +++ b/cluster/centos/node/scripts/flannel.sh @@ -32,7 +32,7 @@ Before=docker.service [Service] EnvironmentFile=-/opt/kubernetes/cfg/flannel -ExecStart=/opt/kubernetes/bin/flanneld \${FLANNEL_ETCD} \${FLANNEL_ETCD_KEY} +ExecStart=/opt/kubernetes/bin/flanneld --ip-masq \${FLANNEL_ETCD} \${FLANNEL_ETCD_KEY} ExecStartPost=/opt/kubernetes/bin/mk-docker-opts.sh -d /run/flannel/docker Type=notify diff --git a/cluster/saltbase/salt/flannel/initd b/cluster/saltbase/salt/flannel/initd index 3e3a98eaa7651..c8e1d3b484177 100644 --- a/cluster/saltbase/salt/flannel/initd +++ b/cluster/saltbase/salt/flannel/initd @@ -17,7 +17,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Flannel overlay network daemon" NAME=flannel DAEMON=/usr/local/bin/flanneld -DAEMON_ARGS="" +DAEMON_ARGS="--ip-masq" DAEMON_LOG_FILE=/var/log/$NAME.log PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME diff --git a/cluster/ubuntu/download-release.sh b/cluster/ubuntu/download-release.sh index 5b42cdc1cbb57..d0ade23b168ac 100755 --- a/cluster/ubuntu/download-release.sh +++ b/cluster/ubuntu/download-release.sh @@ -31,7 +31,7 @@ mkdir -p binaries/master mkdir -p binaries/minion # flannel -FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.3"} +FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"} echo "Prepare flannel ${FLANNEL_VERSION} release ..." grep -q "^${FLANNEL_VERSION}\$" binaries/.flannel 2>/dev/null || { curl -L https://github.com/coreos/flannel/releases/download/v${FLANNEL_VERSION}/flannel-${FLANNEL_VERSION}-linux-amd64.tar.gz -o flannel.tar.gz @@ -73,4 +73,4 @@ grep -q "^${KUBE_VERSION}\$" binaries/.kubernetes 2>/dev/null || { rm -rf flannel* kubernetes* etcd* echo "Done! All your commands locate in kubernetes/cluster/ubuntu/binaries dir" -popd \ No newline at end of file +popd diff --git a/cluster/ubuntu/util.sh b/cluster/ubuntu/util.sh index 7aa3954abec02..58463ea853b61 100755 --- a/cluster/ubuntu/util.sh +++ b/cluster/ubuntu/util.sh @@ -257,6 +257,7 @@ EOF function create-flanneld-opts() { cat < ~/kube/default/flanneld FLANNEL_OPTS="--etcd-endpoints=http://${1}:4001 \ + --ip-masq \ --iface=${2}" EOF } diff --git a/cluster/vagrant/provision-network-master.sh b/cluster/vagrant/provision-network-master.sh index 086a9abc6ccca..9ca33b1624b80 100644 --- a/cluster/vagrant/provision-network-master.sh +++ b/cluster/vagrant/provision-network-master.sh @@ -68,7 +68,7 @@ EOF cat </etc/sysconfig/flanneld FLANNEL_ETCD="${FLANNEL_ETCD_URL}" FLANNEL_ETCD_KEY="/coreos.com/network" -FLANNEL_OPTIONS="-iface=${NETWORK_IF_NAME}" +FLANNEL_OPTIONS="-iface=${NETWORK_IF_NAME} --ip-masq" EOF # Start flannel diff --git a/cluster/vagrant/provision-network-node.sh b/cluster/vagrant/provision-network-node.sh index fba23ed19cbae..d977afcf97669 100644 --- a/cluster/vagrant/provision-network-node.sh +++ b/cluster/vagrant/provision-network-node.sh @@ -33,7 +33,7 @@ function provision-network-node { cat </etc/sysconfig/flanneld FLANNEL_ETCD="${FLANNEL_ETCD_URL}" FLANNEL_ETCD_KEY="/coreos.com/network" -FLANNEL_OPTIONS="-iface=${NETWORK_IF_NAME}" +FLANNEL_OPTIONS="-iface=${NETWORK_IF_NAME} --ip-masq" EOF # Start flannel