Merge pull request #32921 from aanm/adding-service-ip-range-as-option

Automatic merge from submit-queue

local-up-cluster.sh: add SERVICE_CLUSTER_IP_RANGE as option

Allows the user the use an environment variable to specify the SERVICE_CLUSTER_IP_RANGE without modifying the `hack/local-up-cluster.sh` script.

Signed-off-by: André Martins <aanm90@gmail.com>
This commit is contained in:
Kubernetes Submit Queue
2016-09-26 22:30:04 -07:00
committed by GitHub

View File

@@ -27,6 +27,7 @@ RUNTIME_CONFIG=${RUNTIME_CONFIG:-""}
NET_PLUGIN=${NET_PLUGIN:-""} NET_PLUGIN=${NET_PLUGIN:-""}
NET_PLUGIN_DIR=${NET_PLUGIN_DIR:-""} NET_PLUGIN_DIR=${NET_PLUGIN_DIR:-""}
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
SERVICE_CLUSTER_IP_RANGE=${SERVICE_CLUSTER_IP_RANGE:-"10.0.0.0/24"}
# We disable cluster DNS by default because this script uses docker0 (or whatever # We disable cluster DNS by default because this script uses docker0 (or whatever
# container bridge docker is currently using) and we don't know the IP of the # container bridge docker is currently using) and we don't know the IP of the
# DNS pod to pass in as --cluster-dns. To set this up by hand, set this flag # DNS pod to pass in as --cluster-dns. To set this up by hand, set this flag
@@ -307,7 +308,7 @@ function start_apiserver {
--insecure-bind-address="${API_HOST_IP}" \ --insecure-bind-address="${API_HOST_IP}" \
--insecure-port="${API_PORT}" \ --insecure-port="${API_PORT}" \
--etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \ --etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \
--service-cluster-ip-range="10.0.0.0/24" \ --service-cluster-ip-range="${SERVICE_CLUSTER_IP_RANGE}" \
--cloud-provider="${CLOUD_PROVIDER}" \ --cloud-provider="${CLOUD_PROVIDER}" \
--cloud-config="${CLOUD_CONFIG}" \ --cloud-config="${CLOUD_CONFIG}" \
--cors-allowed-origins="${API_CORS_ALLOWED_ORIGINS}" >"${APISERVER_LOG}" 2>&1 & --cors-allowed-origins="${API_CORS_ALLOWED_ORIGINS}" >"${APISERVER_LOG}" 2>&1 &