Allow for configuring etcd progress notify interval on GCE

This commit is contained in:
wojtekt 2020-10-29 15:43:51 +01:00
parent 2729b8e375
commit eb63da77ea
4 changed files with 15 additions and 0 deletions

View File

@ -550,5 +550,8 @@ export KUBE_APISERVER_HEALTHCHECK_ON_HOST_IP="${KUBE_APISERVER_HEALTHCHECK_ON_HO
# through host IP.
export ETCD_LISTEN_ON_HOST_IP="${ETCD_LISTEN_ON_HOST_IP:-false}"
# ETCD_PROGRESS_NOTIFY_INTERVAL defines the interval for etcd watch progress notify events.
export ETCD_PROGRESS_NOTIFY_INTERVAL="${ETCD_PROGRESS_NOTIFY_INTERVAL:-10m}"
# Use host IP instead of localhost in control plane kubeconfig files.
export KUBECONFIG_USE_HOST_IP="${KUBECONFIG_USE_HOST_IP:-false}"

View File

@ -586,5 +586,8 @@ export KUBE_APISERVER_HEALTHCHECK_ON_HOST_IP="${KUBE_APISERVER_HEALTHCHECK_ON_HO
# through host IP.
export ETCD_LISTEN_ON_HOST_IP="${ETCD_LISTEN_ON_HOST_IP:-false}"
# ETCD_PROGRESS_NOTIFY_INTERVAL defines the interval for etcd watch progress notify events.
export ETCD_PROGRESS_NOTIFY_INTERVAL="${ETCD_PROGRESS_NOTIFY_INTERVAL:-10m}"
# Use host IP instead of localhost in control plane kubeconfig files.
export KUBECONFIG_USE_HOST_IP="${KUBECONFIG_USE_HOST_IP:-false}"

View File

@ -1748,6 +1748,10 @@ function prepare-etcd-manifest {
etcd_extra_args+=" --listen-metrics-urls=${etcd_listen_metrics_urls} "
fi
if [[ -n "${ETCD_PROGRESS_NOTIFY_INTERVAL:-}" ]]; then
etcd_extra_args+=" --experimental-watch-progress-notify-interval=${ETCD_PROGRESS_NOTIFY_INTERVAL}"
fi
# If etcd is configured to listen on host IP, an additional client listening URL is added.
local etcd_listen_client_urls="${etcd_apiserver_protocol}://${ETCD_LISTEN_CLIENT_IP:-127.0.0.1}:$2"
if [[ ${ETCD_LISTEN_ON_HOST_IP:-} == "true" ]] ; then

View File

@ -1459,6 +1459,11 @@ EOF
if [ -n "${ETCD_LISTEN_CLIENT_IP:-}" ]; then
cat >>"$file" <<EOF
ETCD_LISTEN_CLIENT_IP: $(yaml-quote "${ETCD_LISTEN_CLIENT_IP}")
EOF
fi
if [ -n "${ETCD_PROGRESS_NOTIFY_INTERVAL:-}" ]; then
cat >>"$file" <<EOF
ETCD_PROGRESS_NOTIFY_INTERVAL: $(yaml-quote "${ETCD_PROGRESS_NOTIFY_INTERVAL}")
EOF
fi