diff --git a/prog/weave-kube/launch.sh b/prog/weave-kube/launch.sh index 22d042c55..2241e8adb 100755 --- a/prog/weave-kube/launch.sh +++ b/prog/weave-kube/launch.sh @@ -38,6 +38,7 @@ setup_iptables_backend # Default if not supplied - same as weave net default IPALLOC_RANGE=${IPALLOC_RANGE:-10.32.0.0/12} +IPALLOC_DEFAULT_SUBNET=${IPALLOC_DEFAULT_SUBNET:-${IPALLOC_RANGE}} HTTP_ADDR=${WEAVE_HTTP_ADDR:-127.0.0.1:6784} METRICS_ADDR=${WEAVE_METRICS_ADDR:-0.0.0.0:6782} HOST_ROOT=${HOST_ROOT:-/host} @@ -149,6 +150,7 @@ post_start_actions & --db-prefix="$DB_PREFIX" \ --ipalloc-range=$IPALLOC_RANGE $NICKNAME_ARG \ --ipalloc-init $IPALLOC_INIT \ + --ipalloc-default-subnet=$IPALLOC_DEFAULT_SUBNET --conn-limit=$CONN_LIMIT \ $WEAVE_NPC_OPTS \ $NO_MASQ_LOCAL_OPT \ diff --git a/site/kubernetes/kube-addon.md b/site/kubernetes/kube-addon.md index bbe8ba750..0ea9f62db 100644 --- a/site/kubernetes/kube-addon.md +++ b/site/kubernetes/kube-addon.md @@ -447,6 +447,8 @@ The list of variables you can set is: by setting `HAIRPIN_MODE=false`. * `IPALLOC_RANGE` - the range of IP addresses used by Weave Net and the subnet they are placed in (CIDR format; default `10.32.0.0/12`) +* `IPALLOC_DEFAULT_SUBNET` - a subnet of IPALLOC_RANGE from which IP addresses + are automatically assigned (CIDR format; default to value of IPALLOC_RANGE). * `EXPECT_NPC` - set to 0 to disable Network Policy Controller (default is on) * `KUBE_PEERS` - list of addresses of peers in the Kubernetes cluster (default is to fetch the list from the api-server)