mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Set min-request-timeout in test clusters
This commit is contained in:
parent
448867073d
commit
f7c0f1c1e3
@ -25,6 +25,7 @@ MASTER_DISK_TYPE=pd-ssd
|
|||||||
MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB}
|
MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB}
|
||||||
MINION_DISK_TYPE=pd-standard
|
MINION_DISK_TYPE=pd-standard
|
||||||
MINION_DISK_SIZE=${MINION_DISK_SIZE:-100GB}
|
MINION_DISK_SIZE=${MINION_DISK_SIZE:-100GB}
|
||||||
|
KUBE_APISERVER_REQUEST_TIMEOUT=300
|
||||||
|
|
||||||
OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-debian}
|
OS_DISTRIBUTION=${KUBE_OS_DISTRIBUTION:-debian}
|
||||||
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-container-vm-v20150505}
|
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}"
|
ENABLE_NODE_MONITORING="${KUBE_ENABLE_NODE_MONITORING:-true}"
|
||||||
|
|
||||||
# Optional: Cluster monitoring to setup as part of the cluster bring up:
|
# Optional: Cluster monitoring to setup as part of the cluster bring up:
|
||||||
# none - No cluster monitoring setup
|
# none - No cluster monitoring setup
|
||||||
# influxdb - Heapster, InfluxDB, and Grafana
|
# influxdb - Heapster, InfluxDB, and Grafana
|
||||||
# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging
|
# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging
|
||||||
ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
|
ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
|
||||||
|
|
||||||
# Optional: Enable node logging.
|
# Optional: Enable node logging.
|
||||||
|
@ -50,6 +50,12 @@ function ensure-install-dir() {
|
|||||||
cd ${INSTALL_DIR}
|
cd ${INSTALL_DIR}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function salt-apiserver-timeout-grain() {
|
||||||
|
cat <<EOF >>/etc/salt/minion.d/grains.conf
|
||||||
|
minRequestTimeout: '$1'
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
function set-broken-motd() {
|
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
|
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
|
salt-run-local
|
||||||
if [[ "${KUBERNETES_MASTER}" == "true" ]]; then
|
if [[ "${KUBERNETES_MASTER}" == "true" ]]; then
|
||||||
salt-master-role
|
salt-master-role
|
||||||
|
if [ -n "${KUBE_APISERVER_REQUEST_TIMEOUT:-}" ]; then
|
||||||
|
salt-apiserver-timeout-grain $KUBE_APISERVER_REQUEST_TIMEOUT
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
salt-node-role
|
salt-node-role
|
||||||
salt-docker-opts
|
salt-docker-opts
|
||||||
|
@ -47,7 +47,11 @@ ADMISSION_CONTROL: $(yaml-quote ${ADMISSION_CONTROL:-})
|
|||||||
MASTER_IP_RANGE: $(yaml-quote ${MASTER_IP_RANGE})
|
MASTER_IP_RANGE: $(yaml-quote ${MASTER_IP_RANGE})
|
||||||
CA_CERT: $(yaml-quote ${CA_CERT_BASE64:-})
|
CA_CERT: $(yaml-quote ${CA_CERT_BASE64:-})
|
||||||
EOF
|
EOF
|
||||||
|
if [ -n "${KUBE_APISERVER_REQUEST_TIMEOUT:-}" ]; then
|
||||||
|
cat >>$file <<EOF
|
||||||
|
KUBE_APISERVER_REQUEST_TIMEOUT: $(yaml-quote ${KUBE_APISERVER_REQUEST_TIMEOUT})
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
if [[ "${master}" == "true" ]]; then
|
if [[ "${master}" == "true" ]]; then
|
||||||
# Master-only env vars.
|
# Master-only env vars.
|
||||||
cat >>$file <<EOF
|
cat >>$file <<EOF
|
||||||
|
@ -59,6 +59,11 @@
|
|||||||
{% set token_auth_file = "--token_auth_file=/dev/null" -%}
|
{% set token_auth_file = "--token_auth_file=/dev/null" -%}
|
||||||
{% set basic_auth_file = "" -%}
|
{% set basic_auth_file = "" -%}
|
||||||
|
|
||||||
|
{% set min_request_timeout = "" -%}
|
||||||
|
{% if grains.minRequestTimeout is defined -%}
|
||||||
|
{% set min_request_timeout = "--min-request-timeout=" + grains.minRequestTimeout -%}
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
{% if grains.cloud is defined -%}
|
{% if grains.cloud is defined -%}
|
||||||
{% if grains.cloud in [ 'aws', 'gce', 'vagrant' ] -%}
|
{% if grains.cloud in [ 'aws', 'gce', 'vagrant' ] -%}
|
||||||
{% set token_auth_file = "--token_auth_file=/srv/kubernetes/known_tokens.csv" -%}
|
{% set token_auth_file = "--token_auth_file=/srv/kubernetes/known_tokens.csv" -%}
|
||||||
@ -79,7 +84,7 @@
|
|||||||
{% set runtime_config = "--runtime_config=" + grains.runtime_config -%}
|
{% set runtime_config = "--runtime_config=" + grains.runtime_config -%}
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{% set params = address + " " + etcd_servers + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + " " + basic_auth_file -%}
|
{% set params = address + " " + etcd_servers + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + " " + basic_auth_file + " " + min_request_timeout -%}
|
||||||
{% set params = params + " " + cluster_name + " " + cert_file + " " + key_file + " --secure_port=" + secure_port + " " + token_auth_file + " " + bind_address + " " + pillar['log_level'] + " " + advertise_address -%}
|
{% set params = params + " " + cluster_name + " " + cert_file + " " + key_file + " --secure_port=" + secure_port + " " + token_auth_file + " " + bind_address + " " + pillar['log_level'] + " " + advertise_address -%}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user