From 1102656c889a93d5fffc6b4040db4dd9944abef2 Mon Sep 17 00:00:00 2001 From: Zihong Zheng Date: Mon, 21 Aug 2017 17:13:12 -0700 Subject: [PATCH] Set up KUBE_PROXY_DAEMONSET env for GCE and common.sh. --- cluster/common.sh | 1 + cluster/gce/config-default.sh | 4 ++++ cluster/gce/config-test.sh | 4 ++++ cluster/gce/configure-vm.sh | 1 + 4 files changed, 10 insertions(+) diff --git a/cluster/common.sh b/cluster/common.sh index 28701049d3c..b70b730c4fc 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -638,6 +638,7 @@ DNS_SERVER_IP: $(yaml-quote ${DNS_SERVER_IP:-}) DNS_DOMAIN: $(yaml-quote ${DNS_DOMAIN:-}) ENABLE_DNS_HORIZONTAL_AUTOSCALER: $(yaml-quote ${ENABLE_DNS_HORIZONTAL_AUTOSCALER:-false}) KUBELET_TOKEN: $(yaml-quote ${KUBELET_TOKEN:-}) +KUBE_PROXY_DAEMONSET: $(yaml-quote ${KUBE_PROXY_DAEMONSET:-false}) KUBE_PROXY_TOKEN: $(yaml-quote ${KUBE_PROXY_TOKEN:-}) NODE_PROBLEM_DETECTOR_TOKEN: $(yaml-quote ${NODE_PROBLEM_DETECTOR_TOKEN:-}) ADMISSION_CONTROL: $(yaml-quote ${ADMISSION_CONTROL:-}) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index efdb67537ca..79fb5f206e8 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -297,3 +297,7 @@ PROVIDER_VARS="${PROVIDER_VARS:-} FLUENTD_GCP_MEMORY_LIMIT FLUENTD_GCP_CPU_REQUE PROMETHEUS_TO_SD_ENDPOINT="${PROMETHEUS_TO_SD_ENDPOINT:-https://monitoring.googleapis.com/}" PROMETHEUS_TO_SD_PREFIX="${PROMETHEUS_TO_SD_PREFIX:-custom.googleapis.com}" ENABLE_PROMETHEUS_TO_SD="${ENABLE_PROMETHEUS_TO_SD:-false}" + +# TODO(#51292): Make kube-proxy Daemonset default and remove the configuration here. +# Optional: Run kube-proxy as a DaemonSet if set to true, run as static pods otherwise. +KUBE_PROXY_DAEMONSET="${KUBE_PROXY_DAEMONSET:-false}" # true, false diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index a7208ff477d..d3c3bd56358 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -356,3 +356,7 @@ PROVIDER_VARS="${PROVIDER_VARS:-} FLUENTD_GCP_MEMORY_LIMIT FLUENTD_GCP_CPU_REQUE PROMETHEUS_TO_SD_ENDPOINT="${PROMETHEUS_TO_SD_ENDPOINT:-https://monitoring.googleapis.com/}" PROMETHEUS_TO_SD_PREFIX="${PROMETHEUS_TO_SD_PREFIX:-custom.googleapis.com}" ENABLE_PROMETHEUS_TO_SD="${ENABLE_PROMETHEUS_TO_SD:-true}" + +# TODO(#51292): Make kube-proxy Daemonset default and remove the configuration here. +# Optional: Run kube-proxy as a DaemonSet if set to true, run as static pods otherwise. +KUBE_PROXY_DAEMONSET="${KUBE_PROXY_DAEMONSET:-false}" # true, false diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index f2ec467e09a..a20b4be4f5f 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -448,6 +448,7 @@ initial_etcd_cluster_state: '$(echo "${INITIAL_ETCD_CLUSTER_STATE:-}" | sed -e " ca_cert_bundle_path: '$(echo "${CA_CERT_BUNDLE_PATH:-}" | sed -e "s/'/''/g")' hostname: $(hostname -s) enable_default_storage_class: '$(echo "$ENABLE_DEFAULT_STORAGE_CLASS" | sed -e "s/'/''/g")' +kube_proxy_daemonset: '$(echo "$KUBE_PROXY_DAEMONSET" | sed -e "s/'/''/g")' EOF if [ -n "${STORAGE_BACKEND:-}" ]; then cat <>/srv/salt-overlay/pillar/cluster-params.sls