Skip to content

Commit f9783ff

Browse files
committed
enable metrics server for scale tests
1 parent c46ebdf commit f9783ff

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2026 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# We need to install metrics-server in the cluster and schedule it on the control-plane
18+
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
19+
helm upgrade --dry-run --debug --install metrics-server metrics-server/metrics-server \
20+
-n kube-system --set "args={--kubelet-insecure-tls}" \
21+
--set "tolerations[0].key=node-role.kubernetes.io/control-plane" \
22+
--set "tolerations[0].operator=Exists" \
23+
--set "tolerations[0].effect=NoSchedule" \
24+
--set resources.requests.cpu=4 \
25+
--set resources.requests.memory=8Gi

tests/e2e/scenarios/scalability/run-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ set -x
1919

2020
make test-e2e-install
2121

22+
REPO_ROOT=$(git rev-parse --show-toplevel)
2223
if [[ -z "${K8S_VERSION:-}" ]]; then
2324
K8S_VERSION=https://storage.googleapis.com/k8s-release-dev/ci/latest.txt
2425
fi
@@ -143,6 +144,7 @@ KUBETEST2_ARGS+=("--cloud-provider=${CLOUD_PROVIDER}")
143144
KUBETEST2_ARGS+=("--cluster-name=${CLUSTER_NAME:-}")
144145
KUBETEST2_ARGS+=("--admin-access=${ADMIN_ACCESS:-}")
145146
KUBETEST2_ARGS+=("--env=KOPS_FEATURE_FLAGS=${KOPS_FEATURE_FLAGS}")
147+
KUBETEST2_ARGS+=("--pre-test-cmd=${REPO_ROOT}/tests/e2e/scenarios/scalability/pre-test.sh")
146148
if [[ "${JOB_TYPE}" == "presubmit" && "${REPO_OWNER}/${REPO_NAME}" == "kubernetes/kops" ]]; then
147149
KUBETEST2_ARGS+=("--build")
148150
KUBETEST2_ARGS+=("--kops-binary-path=${GOPATH}/src/k8s.io/kops/.build/dist/linux/$(go env GOARCH)/kops")
@@ -188,6 +190,7 @@ fi
188190
export PROMETHEUS_KUBE_PROXY_SELECTOR_KEY="k8s-app"
189191
export PROMETHEUS_SCRAPE_APISERVER_ONLY="true"
190192
export CL2_PROMETHEUS_TOLERATE_MASTER="true"
193+
export CL2_EXECSERVICE_TOLERATE_CONTROL_PLANE="true"
191194
export ETCD_PORT="4001" # we want cl2 to use this port for etcd instead of 2379
192195
if [[ "${CLOUD_PROVIDER}" == "aws" && "${SCALE_SCENARIO}" == "performance" ]]; then
193196
# CL2 uses KUBE_SSH_KEY_PATH path to ssh to instances for scraping metrics

0 commit comments

Comments
 (0)