@@ -30,6 +30,12 @@ if [[ -z "${SCALE_SCENARIO:-}" ]]; then
3030 export SCALE_SCENARIO
3131fi
3232
33+ # Default scale test tool to clusterloader2
34+ if [[ -z " ${SCALE_TEST_TOOL:- } " ]]; then
35+ SCALE_TEST_TOOL=" clusterloader2"
36+ fi
37+ echo " SCALE_TEST_TOOL=${SCALE_TEST_TOOL} "
38+
3339# Default cloud provider to aws
3440if [[ -z " ${CLOUD_PROVIDER:- } " ]]; then
3541 CLOUD_PROVIDER=" aws"
197203# used by CL2 Prometheus here https://github.com/kubernetes/perf-tests/blob/master/clusterloader2/pkg/prometheus/manifests/default/kube-proxy-service.yaml#L2
198204export PROMETHEUS_KUBE_PROXY_SELECTOR_KEY=" k8s-app"
199205export ETCD_PORT=" 4001" # we want cl2 to use this port for etcd instead of 2379
200- if [[ " ${CLOUD_PROVIDER} " == " aws" && " ${SCALE_SCENARIO} " == " performance" ]]; then
201- # CL2 uses KUBE_SSH_KEY_PATH path to ssh to instances for scraping metrics
202- cat > " ${GOPATH} " /src/k8s.io/perf-tests/clusterloader2/testing/load/overrides.yaml << EOL
203- # we are not testing PVS at this point
204- CL2_ENABLE_PVS: false
205- ENABLE_RESTART_COUNT_CHECK: false
206+
207+ if [[ " ${SCALE_TEST_TOOL} " == " clusterloader2" ]]; then
208+ if [[ " ${CLOUD_PROVIDER} " == " aws" && " ${SCALE_SCENARIO} " == " performance" ]]; then
209+ # CL2 uses KUBE_SSH_KEY_PATH path to ssh to instances for scraping metrics
210+ cat > " ${GOPATH} " /src/k8s.io/perf-tests/clusterloader2/testing/load/overrides.yaml << EOL
211+ # we are not testing PVS at this point
212+ CL2_ENABLE_PVS: false
213+ ENABLE_RESTART_COUNT_CHECK: false
206214EOL
207- cat " ${GOPATH} " /src/k8s.io/perf-tests/clusterloader2/testing/load/overrides.yaml
208- else
209- cat > " ${GOPATH} " /src/k8s.io/perf-tests/clusterloader2/testing/load/overrides.yaml << EOL
210- # setting a default value here to avoid an incorrect yaml file
211- CL2_ENABLE_PVS: true
215+ cat " ${GOPATH} " /src/k8s.io/perf-tests/clusterloader2/testing/load/overrides.yaml
216+ else
217+ cat > " ${GOPATH} " /src/k8s.io/perf-tests/clusterloader2/testing/load/overrides.yaml << EOL
218+ # setting a default value here to avoid an incorrect yaml file
219+ CL2_ENABLE_PVS: true
212220EOL
213- fi
221+ fi
214222
215- CLUSTERLOADER2_ARGS=()
216- if [[ -n " ${KOPS_CL2_TEST_CONFIG} " ]]; then
217- CLUSTERLOADER2_ARGS+=(" --test-configs=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/${KOPS_CL2_TEST_CONFIG} " )
218- else
219- CLUSTERLOADER2_ARGS+=(" --test-configs=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/load/config.yaml" )
220- CLUSTERLOADER2_ARGS+=(" --test-configs=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/access-tokens/config.yaml" )
221- CLUSTERLOADER2_ARGS+=(" --test-overrides=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/load/overrides.yaml" )
222- CLUSTERLOADER2_ARGS+=(" --test-overrides=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/experiments/enable_restart_count_check.yaml" )
223- CLUSTERLOADER2_ARGS+=(" --test-overrides=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/experiments/ignore_known_gce_container_restarts.yaml" )
224- CLUSTERLOADER2_ARGS+=(" --test-overrides=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/overrides/5000_nodes.yaml" )
225- CLUSTERLOADER2_ARGS+=(" --extra-args=--experimental-prometheus-snapshot-to-report-dir=true" )
223+ CLUSTERLOADER2_ARGS=()
224+ if [[ -n " ${KOPS_CL2_TEST_CONFIG} " ]]; then
225+ CLUSTERLOADER2_ARGS+=(" --test-configs=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/${KOPS_CL2_TEST_CONFIG} " )
226+ else
227+ CLUSTERLOADER2_ARGS+=(" --test-configs=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/load/config.yaml" )
228+ CLUSTERLOADER2_ARGS+=(" --test-configs=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/access-tokens/config.yaml" )
229+ CLUSTERLOADER2_ARGS+=(" --test-overrides=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/load/overrides.yaml" )
230+ CLUSTERLOADER2_ARGS+=(" --test-overrides=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/experiments/enable_restart_count_check.yaml" )
231+ CLUSTERLOADER2_ARGS+=(" --test-overrides=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/experiments/ignore_known_gce_container_restarts.yaml" )
232+ CLUSTERLOADER2_ARGS+=(" --test-overrides=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/overrides/5000_nodes.yaml" )
233+ CLUSTERLOADER2_ARGS+=(" --extra-args=--experimental-prometheus-snapshot-to-report-dir=true" )
234+ fi
235+
236+ # ToDo: remove this once we can run the huge-service test on AWS
237+ if [[ -z " ${KOPS_CL2_TEST_CONFIG} " && " ${CLOUD_PROVIDER} " == " gce" ]]; then
238+ CLUSTERLOADER2_ARGS+=(" --test-configs=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/huge-service/config.yaml" )
239+ fi
226240fi
227241
228- # ToDo: remove this once we can run the huge-service test on AWS
229- if [[ -z " ${KOPS_CL2_TEST_CONFIG} " && " ${CLOUD_PROVIDER} " == " gce" ]]; then
230- CLUSTERLOADER2_ARGS+=(" --test-configs=${GOPATH} /src/k8s.io/perf-tests/clusterloader2/testing/huge-service/config.yaml" )
242+ if [[ " ${SCALE_TEST_TOOL} " == " kube-burner" ]]; then
243+ KUBE_BURNER_ARGS=()
244+ KUBE_BURNER_ARGS+=(" --workload=${KUBE_BURNER_WORKLOAD} " )
245+ KUBE_BURNER_ARGS+=(" --kube-config=${HOME} /.kube/config" )
246+ if [[ -n " ${KUBE_BURNER_PATH:- } " ]]; then
247+ KUBE_BURNER_ARGS+=(" --kube-burner-path=${KUBE_BURNER_PATH} " )
248+ fi
249+ if [[ -n " ${KUBE_BURNER_REPORT_DIR:- } " ]]; then
250+ KUBE_BURNER_ARGS+=(" --report-dir=${KUBE_BURNER_REPORT_DIR} " )
251+ fi
252+ if [[ -n " ${KUBE_BURNER_LOG_LEVEL:- } " ]]; then
253+ KUBE_BURNER_ARGS+=(" --log-level=${KUBE_BURNER_LOG_LEVEL} " )
254+ fi
255+ if [[ -n " ${KUBE_BURNER_UUID:- } " ]]; then
256+ KUBE_BURNER_ARGS+=(" --uuid=${KUBE_BURNER_UUID} " )
257+ fi
258+ if [[ " ${KUBE_BURNER_SKIP_TLS_VERIFY:- } " == " true" ]]; then
259+ KUBE_BURNER_ARGS+=(" --skip-tls-verify" )
260+ fi
261+ if [[ -n " ${KUBE_BURNER_EXTRA_ARGS:- } " ]]; then
262+ KUBE_BURNER_ARGS+=(" --extra-args=${KUBE_BURNER_EXTRA_ARGS} " )
263+ fi
231264fi
232265
233266if [[ " ${SCALE_SCENARIO: performance} " == " correctness" ]]; then
@@ -243,14 +276,24 @@ if [[ "${SCALE_SCENARIO:performance}" == "correctness" ]]; then
243276 --skip-regex=" \[Driver:.gcepd\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:([^L].*|L[^o].*|Lo[^a].*|Loa[^d].*)\]\[KubeUp\]" \
244277 --parallel=25
245278else
246- kubetest2 kops " ${KUBETEST2_ARGS[@]} " \
247- --up \
248- --kubernetes-version=" ${K8S_VERSION} " \
249- --create-args=" ${create_args[*]} " \
250- --test=clusterloader2 \
251- -- \
252- --provider=" ${CLOUD_PROVIDER} " \
253- --repo-root=" ${GOPATH} " /src/k8s.io/perf-tests \
254- --kube-config=" ${HOME} /.kube/config" \
255- " ${CLUSTERLOADER2_ARGS[@]} "
279+ if [[ " ${SCALE_TEST_TOOL} " == " kube-burner" ]]; then
280+ kubetest2 kops " ${KUBETEST2_ARGS[@]} " \
281+ --up \
282+ --kubernetes-version=" ${K8S_VERSION} " \
283+ --create-args=" ${create_args[*]} " \
284+ --test=kube-burner \
285+ -- \
286+ " ${KUBE_BURNER_ARGS[@]} "
287+ else
288+ kubetest2 kops " ${KUBETEST2_ARGS[@]} " \
289+ --up \
290+ --kubernetes-version=" ${K8S_VERSION} " \
291+ --create-args=" ${create_args[*]} " \
292+ --test=clusterloader2 \
293+ -- \
294+ --provider=" ${CLOUD_PROVIDER} " \
295+ --repo-root=" ${GOPATH} " /src/k8s.io/perf-tests \
296+ --kube-config=" ${HOME} /.kube/config" \
297+ " ${CLUSTERLOADER2_ARGS[@]} "
298+ fi
256299fi
0 commit comments