add anonymous auth for CL2 Prometheus pod to scrape APIServer metrics endpoint

This commit is contained in:
Harish Kuna 2023-10-12 20:52:47 -07:00
parent 3c7e90ef0b
commit 16ab312e7c
1 changed files with 10 additions and 5 deletions

View File

@ -113,7 +113,9 @@ create_args+=("--set spec.kubeAPIServer.maxRequestsInflight=800")
create_args+=("--set spec.kubeAPIServer.maxMutatingRequestsInflight=400")
create_args+=("--set spec.kubeAPIServer.enableProfiling=true")
create_args+=("--set spec.kubeAPIServer.enableContentionProfiling=true")
create_args+=("--node-count=${KUBE_NODE_COUNT:-101}")
# this is required for Prometheus server to scrape metrics endpoint on APIServer
create_args+=("--set spec.kubeAPIServer.anonymousAuth=true")
create_args+=("--node-count=500")
# TODO: track failures of tests (HostPort & OIDC) when using `--dns=none`
create_args+=("--dns none")
create_args+=("--node-size=t3a.large,c7a.large,m7a.large,m6a.large,r7a.large,r6a.large")
@ -156,18 +158,21 @@ kops get instances
# CL2 uses KUBE_SSH_KEY_PATH path to ssh to instances for scraping metrics
export KUBE_SSH_KEY_PATH="/tmp/kops/${CLUSTER_NAME}/id_ed25519"
kubetest2 kops "${KUBETEST2_ARGS[@]}" \
export PROMETHEUS_SCRAPE_KUBE_PROXY=false
export CL2_ENABLE_DNS_PROGRAMMING=false
printenv
export PROMETHEUS_SCRAPE_KUBE_PROXY=false 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 \
--test-configs="${GOPATH}"/src/k8s.io/perf-tests/clusterloader2/testing/huge-service/config.yaml \
--test-configs="${GOPATH}"/src/k8s.io/perf-tests/clusterloader2/testing/access-tokens/config.yaml \
--kube-config="${KUBECONFIG}"
printenv
if [[ "${DELETE_CLUSTER:-}" == "true" ]]; then
kubetest2 kops "${KUBETEST2_ARGS[@]}" --down
DELETE_CLUSTER=false # Don't delete again in trap