diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index e74203b6dff..d8035a4c84a 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -25,6 +25,7 @@ MASTER_DISK_TYPE=pd-ssd MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB} MINION_DISK_TYPE=pd-standard MINION_DISK_SIZE=${MINION_DISK_SIZE:-100GB} +KUBE_APISERVER_REQUEST_TIMEOUT=300 OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-debian} MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-container-vm-v20150505} @@ -53,9 +54,9 @@ ENABLE_DOCKER_REGISTRY_CACHE=true ENABLE_NODE_MONITORING="${KUBE_ENABLE_NODE_MONITORING:-true}" # Optional: Cluster monitoring to setup as part of the cluster bring up: -# none - No cluster monitoring setup -# influxdb - Heapster, InfluxDB, and Grafana -# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging +# none - No cluster monitoring setup +# influxdb - Heapster, InfluxDB, and Grafana +# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}" # Optional: Enable node logging. diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 30e5a91ecfc..fb1b46a3ca6 100644 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -50,6 +50,12 @@ function ensure-install-dir() { cd ${INSTALL_DIR} } +function salt-apiserver-timeout-grain() { + cat <>/etc/salt/minion.d/grains.conf + minRequestTimeout: '$1' +EOF +} + function set-broken-motd() { echo -e '\nBroken (or in progress) GCE Kubernetes node setup! Suggested first step:\n tail /var/log/startupscript.log\n' > /etc/motd } @@ -538,6 +544,9 @@ function configure-salt() { salt-run-local if [[ "${KUBERNETES_MASTER}" == "true" ]]; then salt-master-role + if [ -n "${KUBE_APISERVER_REQUEST_TIMEOUT:-}" ]; then + salt-apiserver-timeout-grain $KUBE_APISERVER_REQUEST_TIMEOUT + fi else salt-node-role salt-docker-opts diff --git a/cluster/gce/debian/helper.sh b/cluster/gce/debian/helper.sh index 98eb503683a..ed6b73e152d 100644 --- a/cluster/gce/debian/helper.sh +++ b/cluster/gce/debian/helper.sh @@ -47,7 +47,11 @@ ADMISSION_CONTROL: $(yaml-quote ${ADMISSION_CONTROL:-}) MASTER_IP_RANGE: $(yaml-quote ${MASTER_IP_RANGE}) CA_CERT: $(yaml-quote ${CA_CERT_BASE64:-}) EOF - + if [ -n "${KUBE_APISERVER_REQUEST_TIMEOUT:-}" ]; then + cat >>$file <>$file <