From 6dbe95a0b5270359f8582a471b7fbae09588fedd Mon Sep 17 00:00:00 2001 From: Martynas Pumputis Date: Sun, 13 May 2018 10:04:33 +0200 Subject: [PATCH] Add NO_MASQ_LOCAL to weave-kube/launch.sh One can enable the feature by setting NO_MASQ_LOCAL=1 among env vars of the weave-kube DaemonSet. --- prog/weave-kube/launch.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/prog/weave-kube/launch.sh b/prog/weave-kube/launch.sh index 9ee11402..d56d5f82 100755 --- a/prog/weave-kube/launch.sh +++ b/prog/weave-kube/launch.sh @@ -66,6 +66,11 @@ if [ "${EXPECT_NPC}" = "0" ]; then WEAVE_NPC_OPTS="" fi +NO_MASQ_LOCAL_OPT="" +if [ -n "${NO_MASQ_LOCAL}" ]; then + NO_MASQ_LOCAL_OPT="--no-masq-local" +fi + # Kubernetes sets HOSTNAME to the host's hostname # when running a pod in host namespace. NICKNAME_ARG="" @@ -156,5 +161,6 @@ post_start_actions & --ipalloc-init $IPALLOC_INIT \ --conn-limit=$CONN_LIMIT \ $WEAVE_NPC_OPTS \ + $NO_MASQ_LOCAL_OPT \ "$@" \ $KUBE_PEERS