Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Add support for the IPALLOC_DEFAULT_SUBNET environment variable to the launch.sh script #3953

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions prog/weave-kube/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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 \
Expand Down
2 changes: 2 additions & 0 deletions site/kubernetes/kube-addon.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down