From 40632d3bf6a33e4ef14e6e8085df7ad156db62e7 Mon Sep 17 00:00:00 2001 From: Maru Newby Date: Tue, 30 Jun 2015 22:07:37 -0700 Subject: [PATCH] Vagrant: Allow env override of IP addresses MASTER_IP and MINION_IP_BASE are hard-coded in vagrant's config-default.sh, and the values correspond to virtualbox's default subnet. On hosts that have both virtualbox and another provider installed, attempting to deploy kubernetes with the non-virtualbox provider is likely to result in broken networking. This change allows the addresses to be overridden via the environment so that more appropriate values can be used. --- cluster/vagrant/config-default.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster/vagrant/config-default.sh b/cluster/vagrant/config-default.sh index 3cf0f26818f..f76b66184ad 100755 --- a/cluster/vagrant/config-default.sh +++ b/cluster/vagrant/config-default.sh @@ -21,14 +21,14 @@ NUM_MINIONS=${NUM_MINIONS-"1"} export NUM_MINIONS # The IP of the master -export MASTER_IP="10.245.1.2" -export KUBE_MASTER_IP="10.245.1.2" +export MASTER_IP=${MASTER_IP-"10.245.1.2"} +export KUBE_MASTER_IP=${MASTER_IP} export INSTANCE_PREFIX="kubernetes" export MASTER_NAME="${INSTANCE_PREFIX}-master" # Map out the IPs, names and container subnets of each minion -export MINION_IP_BASE="10.245.1." +export MINION_IP_BASE=${MINION_IP_BASE-"10.245.1."} MINION_CONTAINER_SUBNET_BASE="10.246" MASTER_CONTAINER_NETMASK="255.255.255.0" MASTER_CONTAINER_ADDR="${MINION_CONTAINER_SUBNET_BASE}.0.1"