Merge pull request #3756 from weaveworks/issue-3389
Change NO_MASQ_LOCAL option to default ON
This commit is contained in:
3 files changed
+6
-6
No files matched your search
@@ -67,6 +67,7 @@ DB_PREFIX=${DB_PREFIX:-/weavedb/weave-net}
|
||||
|
||||
# Default for network policy
|
||||
EXPECT_NPC=${EXPECT_NPC:-1}
|
||||
NO_MASQ_LOCAL=${NO_MASQ_LOCAL:-1}
|
||||
|
||||
# Ensure we have the required modules for NPC
|
||||
if [ "${EXPECT_NPC}" != "0" ]; then
|
||||
@@ -96,9 +97,9 @@ 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"
|
||||
NO_MASQ_LOCAL_OPT="--no-masq-local"
|
||||
if [ "${NO_MASQ_LOCAL}" = "0" ]; then
|
||||
NO_MASQ_LOCAL_OPT=""
|
||||
fi
|
||||
|
||||
# Kubernetes sets HOSTNAME to the host's hostname
|
||||
|
||||
@@ -421,9 +421,9 @@ The list of variables you can set is:
|
||||
a larger size for better performance if your network supports jumbo
|
||||
frames - see [here](/site/tasks/manage/fastdp.md#mtu) for more
|
||||
details.
|
||||
* `NO_MASQ_LOCAL` - set to 1 to preserve the client source IP address when
|
||||
* `NO_MASQ_LOCAL` - set to 0 to disable preserving the client source IP address when
|
||||
accessing Service annotated with `service.spec.externalTrafficPolicy=Local`.
|
||||
The feature works only with Weave IPAM (default).
|
||||
This feature works only with Weave IPAM (default).
|
||||
* `IPTABLES_BACKEND` - set to `nft` to use `nftables` backend for `iptables` (default is `iptables`)
|
||||
|
||||
Example:
|
||||
|
||||
@@ -366,7 +366,6 @@ assert_raises "$SSH $HOST1 $KUBECTL exec $denyPodName -- curl -s -S -f -m 2 http
|
||||
|
||||
CLIENT_IP_MASQ="$($SSH $HOST1 curl -sS http://$HOST2:31138/client_ip)"
|
||||
|
||||
WEAVE_ENV_VARS="${WEAVE_ENV_VARS}\\n - name: NO_MASQ_LOCAL\\n value: \"1\""
|
||||
$SSH $HOST1 "$KUBECTL delete ds weave-net -n=kube-system"
|
||||
sed -e "s%imagePullPolicy: Always%imagePullPolicy: Never%" \
|
||||
-e "s%env:%$WEAVE_ENV_VARS%" \
|
||||
|
||||
Reference in new issue
Block a user