Add CL2 test command to scalability scenario (#15538)

* Add CL2 test command to run-test.sh script

* minor changes to address PR feedback

* Include ssh pub key when creating cluster

* minor fix the variable name

* Switch control plane to c6g.2xlarge

* Use a single etcd cluster

* Enable etcd metrics

* Use kubetest2 SSH key for CL2

* exclude /metrics from auth in scheduler

* refactor custom flags for scheduler

---------

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
This commit is contained in:
Prateek Gogia 2023-06-27 23:54:32 -05:00 committed by GitHub
parent fab79a969a
commit bfa9ca2ee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 3 deletions

View File

@ -87,12 +87,16 @@ echo "ADMIN_ACCESS=${ADMIN_ACCESS}"
#create_args="--networking cilium" #create_args="--networking cilium"
create_args=() create_args=()
create_args+=("--networking=calico") create_args+=("--networking=calico")
create_args+=("--etcd-clusters=main")
create_args+=("--set spec.etcdClusters[0].manager.listenMetricsURLs=http://localhost:2382")
create_args+=("--set spec.kubeScheduler.authorizationAlwaysAllowPaths=/healthz")
create_args+=("--set spec.kubeScheduler.authorizationAlwaysAllowPaths=/metrics")
create_args+=("--node-count=${KUBE_NODE_COUNT:-101}") create_args+=("--node-count=${KUBE_NODE_COUNT:-101}")
# TODO: Use the newer non-DNS mode, more scalable than gossip and generally recommended # TODO: Use the newer non-DNS mode, more scalable than gossip and generally recommended
# However, it currently fails two tests (HostPort & OIDC) so need to track that down # However, it currently fails two tests (HostPort & OIDC) so need to track that down
#create_args="--dns none" #create_args="--dns none"
create_args+=("--node-size=c6g.medium") create_args+=("--node-size=c6g.medium")
create_args+=("--master-size=c6g.xlarge") create_args+=("--master-size=c6g.2xlarge")
if [[ -n "${ZONES:-}" ]]; then if [[ -n "${ZONES:-}" ]]; then
create_args+=("--zones=${ZONES}") create_args+=("--zones=${ZONES}")
fi fi
@ -126,9 +130,21 @@ kubetest2 kops "${KUBETEST2_ARGS[@]}" \
--create-args="${create_args[*]}" \ --create-args="${create_args[*]}" \
--control-plane-size="${KOPS_CONTROL_PLANE_SIZE:-1}" --control-plane-size="${KOPS_CONTROL_PLANE_SIZE:-1}"
KUBECONFIG=$(mktemp -t kubeconfig.XXXXXXXXX)
kops export kubecfg --admin --kubeconfig="${KUBECONFIG}"
if [[ "${RUN_CL2_TEST:-}" == "true" ]]; then if [[ "${RUN_CL2_TEST:-}" == "true" ]]; then
# TODO # CL2 uses KUBE_SSH_KEY_PATH path to ssh to instances for scraping metrics
echo "Run CL2 tests" export KUBE_SSH_KEY_PATH="/tmp/kops/${CLUSTER_NAME}/id_ed25519"
kubetest2 kops "${KUBETEST2_ARGS[@]}" \
--test=clusterloader2 \
--kubernetes-version="${K8S_VERSION}" \
-- \
--provider="${CLOUD_PROVIDER}" \
--repo-root="${GOPATH}"/src/k8s.io/perf-tests \
--test-configs="${GOPATH}"/src/k8s.io/perf-tests/clusterloader2/testing/load/config.yaml \
--kube-config="${KUBECONFIG}"
else else
kubetest2 kops "${KUBETEST2_ARGS[@]}" \ kubetest2 kops "${KUBETEST2_ARGS[@]}" \
--test=kops \ --test=kops \