From ef015c3574b96f14d65c400ed406eeae65c1019f Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Fri, 9 Oct 2015 09:55:49 -0700 Subject: [PATCH] add config-vm flag to enable terminated pod garbage collection. --- cluster/gce/config-test.sh | 1 + cluster/gce/configure-vm.sh | 5 +++++ cluster/gce/debian/helper.sh | 5 +++++ .../kube-controller-manager.manifest | 8 +++++++- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 47bbc070047..8c12a6aced0 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -47,6 +47,7 @@ MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}" MINION_SCOPES="${MINION_SCOPES:-compute-rw,monitoring,logging-write,storage-ro}" RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}" ENABLE_EXPERIMENTAL_API="${KUBE_ENABLE_EXPERIMENTAL_API:-false}" +TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100} # Increase the sleep interval value if concerned about API rate limits. 3, in seconds, is the default. POLL_SLEEP_INTERVAL=3 diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 54e749e6fe8..37488654dab 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -322,6 +322,11 @@ EOF if [ -n "${ENABLE_EXPERIMENTAL_API:-}" ]; then cat <>/srv/salt-overlay/pillar/cluster-params.sls enable_experimental_api: '$(echo "$ENABLE_EXPERIMENTAL_API" | sed -e "s/'/''/g")' +EOF + fi + if [ -n "${TERMINATED_POD_GC_THRESHOLD:-}" ]; then + cat <>/srv/salt-overlay/pillar/cluster-params.sls +terminated_pod_gc_threshold: '$(echo "${TERMINATED_POD_GC_THRESHOLD}" | sed -e "s/'/''/g")' EOF fi } diff --git a/cluster/gce/debian/helper.sh b/cluster/gce/debian/helper.sh index 7fa80edc869..c01848ddab1 100755 --- a/cluster/gce/debian/helper.sh +++ b/cluster/gce/debian/helper.sh @@ -64,6 +64,11 @@ EOF if [ -n "${KUBE_APISERVER_REQUEST_TIMEOUT:-}" ]; then cat >>$file <>$file <