add config-vm flag to enable terminated pod garbage collection.
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -322,6 +322,11 @@ EOF | ||||
|     if [ -n "${ENABLE_EXPERIMENTAL_API:-}" ]; then | ||||
|       cat <<EOF >>/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 <<EOF >>/srv/salt-overlay/pillar/cluster-params.sls | ||||
| terminated_pod_gc_threshold: '$(echo "${TERMINATED_POD_GC_THRESHOLD}" | sed -e "s/'/''/g")' | ||||
| EOF | ||||
|     fi | ||||
| } | ||||
|   | ||||
| @@ -64,6 +64,11 @@ EOF | ||||
|   if [ -n "${KUBE_APISERVER_REQUEST_TIMEOUT:-}" ]; then | ||||
|     cat >>$file <<EOF | ||||
| KUBE_APISERVER_REQUEST_TIMEOUT: $(yaml-quote ${KUBE_APISERVER_REQUEST_TIMEOUT}) | ||||
| EOF | ||||
|   fi | ||||
|   if [ -n "${TERMINATED_POD_GC_THRESHOLD:-}" ]; then | ||||
|     cat >>$file <<EOF | ||||
| TERMINATED_POD_GC_THRESHOLD: $(yaml-quote ${TERMINATED_POD_GC_THRESHOLD}) | ||||
| EOF | ||||
|   fi | ||||
|   if [ -n "${TEST_CLUSTER:-}" ]; then | ||||
|   | ||||
| @@ -1,6 +1,8 @@ | ||||
| {% set cluster_name = "" -%} | ||||
| {% set cluster_cidr = "" -%} | ||||
| {% set allocate_node_cidrs = "" -%} | ||||
| {% set terminated_pod_gc = "" -%} | ||||
|  | ||||
|  | ||||
| {% if pillar['instance_prefix'] is defined -%} | ||||
|   {% set cluster_name = "--cluster-name=" + pillar['instance_prefix'] -%} | ||||
| @@ -11,6 +13,9 @@ | ||||
| {% if pillar['allocate_node_cidrs'] is defined -%} | ||||
|   {% set allocate_node_cidrs = "--allocate-node-cidrs=" + pillar['allocate_node_cidrs'] -%} | ||||
| {% endif -%} | ||||
| {% if pillar['terminated_pod_gc_threshold'] is defined -%} | ||||
|   {% set terminated_pod_gc = "--terminated-pod-gc-threshold=" + pillar['terminated_pod_gc_threshold'] -%} | ||||
| {% endif -%} | ||||
|  | ||||
| {% set cloud_provider = "" -%} | ||||
| {% set cloud_config = "" -%} | ||||
| @@ -34,7 +39,8 @@ | ||||
|    {% set root_ca_file = "--root-ca-file=/srv/kubernetes/ca.crt" -%} | ||||
| {% endif -%} | ||||
|  | ||||
| {% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + cloud_provider  + " " + cloud_config + service_account_key + pillar['log_level'] + " " + root_ca_file -%} | ||||
| {% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + terminated_pod_gc + " " + cloud_provider  + " " + cloud_config + service_account_key + pillar['log_level'] + " " + root_ca_file -%} | ||||
|  | ||||
|  | ||||
| # test_args has to be kept at the end, so they'll overwrite any prior configuration | ||||
| {% if pillar['controller_manager_test_args'] is defined -%} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Mike Danese
					Mike Danese