Merge pull request #29332 from caesarxuchao/gc-e2e
Automatic merge from submit-queue [Garbage Collector] add e2e tests again #27151 is reverted because gke didn't start correctly after it's merged (https://github.com/kubernetes/kubernetes/pull/27151#issuecomment-233030686). The possible problem is the `unbound variable`, which is fixed in the second commit of this PR. However, I cannot verify if the PR will fail the gke suite since I don't have the environment to run that suite. @wojtek-t @lavalamp
This commit is contained in:
@@ -645,6 +645,7 @@ MANIFEST_URL: $(yaml-quote ${MANIFEST_URL:-})
|
||||
MANIFEST_URL_HEADER: $(yaml-quote ${MANIFEST_URL_HEADER:-})
|
||||
NUM_NODES: $(yaml-quote ${NUM_NODES})
|
||||
INITIAL_ETCD_CLUSTER: $(yaml-quote ${MASTER_NAME})
|
||||
ENABLE_GARBAGE_COLLECTOR: $(yaml-quote ${ENABLE_GARBAGE_COLLECTOR:-false})
|
||||
EOF
|
||||
if [ -n "${APISERVER_TEST_ARGS:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
|
@@ -616,6 +616,9 @@ function start-kube-apiserver {
|
||||
params+=" --tls-cert-file=/etc/srv/kubernetes/server.cert"
|
||||
params+=" --tls-private-key-file=/etc/srv/kubernetes/server.key"
|
||||
params+=" --token-auth-file=/etc/srv/kubernetes/known_tokens.csv"
|
||||
if [[ -n "${ENABLE_GARBAGE_COLLECTOR:-}" ]]; then
|
||||
params+=" --enable-garbage-collector=${ENABLE_GARBAGE_COLLECTOR}"
|
||||
fi
|
||||
if [[ -n "${SERVICE_CLUSTER_IP_RANGE:-}" ]]; then
|
||||
params+=" --service-cluster-ip-range=${SERVICE_CLUSTER_IP_RANGE}"
|
||||
fi
|
||||
@@ -701,6 +704,9 @@ function start-kube-controller-manager {
|
||||
params+=" --master=127.0.0.1:8080"
|
||||
params+=" --root-ca-file=/etc/srv/kubernetes/ca.crt"
|
||||
params+=" --service-account-private-key-file=/etc/srv/kubernetes/server.key"
|
||||
if [[ -n "${ENABLE_GARBAGE_COLLECTOR:-}" ]]; then
|
||||
params+=" --enable-garbage-collector=${ENABLE_GARBAGE_COLLECTOR}"
|
||||
fi
|
||||
if [[ -n "${INSTANCE_PREFIX:-}" ]]; then
|
||||
params+=" --cluster-name=${INSTANCE_PREFIX}"
|
||||
fi
|
||||
|
@@ -122,7 +122,12 @@
|
||||
{% set log_level = pillar['api_server_test_log_level'] -%}
|
||||
{% endif -%}
|
||||
|
||||
{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout -%}
|
||||
{% set enable_garbage_collector = "" -%}
|
||||
{% if pillar['enable_garbage_collector'] is defined -%}
|
||||
{% set enable_garbage_collector = "--enable-garbage-collector=" + pillar['enable_garbage_collector'] -%}
|
||||
{% endif -%}
|
||||
|
||||
{% set params = address + " " + etcd_servers + " " + etcd_servers_overrides + " " + cloud_provider + " " + cloud_config + " " + runtime_config + " " + admission_control + " " + service_cluster_ip_range + " " + client_ca_file + basic_auth_file + " " + min_request_timeout + " " + enable_garbage_collector -%}
|
||||
{% set params = params + " " + cert_file + " " + key_file + " --secure-port=" + secure_port + token_auth_file + " " + bind_address + " " + log_level + " " + advertise_address + " " + proxy_ssh_options + authz_mode + abac_policy_file + webhook_authentication_config + webhook_authorization_config -%}
|
||||
|
||||
# test_args has to be kept at the end, so they'll overwrite any prior configuration
|
||||
|
@@ -27,6 +27,11 @@
|
||||
{% set terminated_pod_gc = "--terminated-pod-gc-threshold=" + pillar['terminated_pod_gc_threshold'] -%}
|
||||
{% endif -%}
|
||||
|
||||
{% set enable_garbage_collector = "" -%}
|
||||
{% if pillar['enable_garbage_collector'] is defined -%}
|
||||
{% set enable_garbage_collector = "--enable-garbage-collector=" + pillar['enable_garbage_collector'] -%}
|
||||
{% endif -%}
|
||||
|
||||
{% set cloud_provider = "" -%}
|
||||
{% set cloud_config = "" -%}
|
||||
{% set cloud_config_mount = "" -%}
|
||||
@@ -68,7 +73,7 @@
|
||||
{% set log_level = pillar['controller_manager_test_log_level'] -%}
|
||||
{% endif -%}
|
||||
|
||||
{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + service_cluster_ip_range + " " + terminated_pod_gc + " " + cloud_provider + " " + cloud_config + " " + service_account_key + " " + log_level + " " + root_ca_file -%}
|
||||
{% set params = "--master=127.0.0.1:8080" + " " + cluster_name + " " + cluster_cidr + " " + allocate_node_cidrs + " " + service_cluster_ip_range + " " + terminated_pod_gc + " " + enable_garbage_collector + " " + cloud_provider + " " + cloud_config + " " + service_account_key + " " + log_level + " " + root_ca_file -%}
|
||||
|
||||
|
||||
# test_args has to be kept at the end, so they'll overwrite any prior configuration
|
||||
|
Reference in New Issue
Block a user