From 45f6203f1e9b492dc1c17028a187894c32a21f63 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Mon, 27 Jun 2022 18:13:36 +0200 Subject: [PATCH 1/2] the "launch.sh" script now also supports the IPALLOC_DEFAULT_SUBNET environment variable, which is passed on to the --ipalloc-default-subnet parameter of the weaver program --- prog/weave-kube/launch.sh | 2 ++ 1 file changed, 2 insertions(+) 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 \ From e3d9efbce2d2ec049a6576261daa2ee8073bcc0f Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Mon, 27 Jun 2022 18:18:25 +0200 Subject: [PATCH 2/2] update documentation --- site/kubernetes/kube-addon.md | 2 ++ 1 file changed, 2 insertions(+) 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)