Skip to content

Commit a151318

Browse files
hakuna-matatahHarish Kuna
andauthored
make cl2 load task tie to perf-tests-cl2-k8s-repo release version (#288)
Co-authored-by: Harish Kuna <[email protected]>
1 parent 05879a3 commit a151318

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

tests/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Kubernetes Iteration Toolkit Tests with Tekton
2+
3+
### Overview:
4+
Tekton is a powerful and flexible open-source framework for creating CI/CD systems, allowing developers to build, test, and deploy across cloud providers and on-premise systems.
5+
6+
7+
8+
### Test Images
9+
10+
Tekton tasks can leverage image like clusterloader2 to perform various kinds of tests like load, pod-density on K8s cluster on KIT infra.
11+
To build the docker image for clusterloader2 use the below command which takes `branch` as a build arg which lets us build clusterloader2 for a given branch on this repo[here](https://github.com/kubernetes/perf-tests/tree/master/clusterloader2)
12+
13+
- docker build --build-arg branch=release-1.23 ./images/clusterloader2/

tests/images/clusterloader2/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
FROM golang:1.16.4 AS builder
22
WORKDIR /go/src/k8s.io
33
RUN git clone https://github.com/kubernetes/perf-tests
4+
WORKDIR perf-tests
5+
RUN git fetch origin --verbose --tags
6+
RUN git checkout $branch
47
WORKDIR /go/src/k8s.io/perf-tests/clusterloader2
58
RUN GOPROXY=direct GOOS=linux CGO_ENABLED=0 go build -o ./clusterloader ./cmd
69

tests/tasks/generators/clusterloader/load.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ spec:
1010
- name: giturl
1111
description: "git url to clone the package"
1212
default: https://github.com/kubernetes/perf-tests.git
13+
- name: cl2-branch
14+
description: "The branch of clusterloader2 you want to use"
15+
default: "release-1.23"
1316
- name: nodes-per-namespace
1417
description: "nodes per namespace to get created for load test "
1518
default: "100"
@@ -39,7 +42,12 @@ spec:
3942
- name: git-clone
4043
image: alpine/git
4144
workingDir: $(workspaces.source.path)
42-
args: ["clone", "$(params.giturl)"]
45+
script: |
46+
git clone $(params.giturl)
47+
cd $(workspaces.source.path)/perf-tests/
48+
git fetch origin --verbose --tags
49+
git checkout $(params.cl2-branch)
50+
git branch
4351
- name: prepare-loadtest
4452
image: alpine/k8s:1.22.6
4553
workingDir: $(workspaces.source.path)
@@ -70,6 +78,7 @@ spec:
7078
ENDPOINT_FLAG="--endpoint $(params.endpoint)"
7179
fi
7280
aws eks $ENDPOINT_FLAG update-kubeconfig --name $(params.cluster-name) --region $(params.region)
81+
cat $(workspaces.source.path)/perf-tests/clusterloader2/testing/load/config.yaml
7382
ENABLE_EXEC_SERVICE=false /clusterloader --kubeconfig=/root/.kube/config --testconfig=$(workspaces.source.path)/perf-tests/clusterloader2/testing/load/config.yaml --testoverrides=$(workspaces.source.path)/overrides.yaml --nodes=$(params.nodes) --provider=eks --report-dir=$(workspaces.results.path) --alsologtostderr --v=2
7483
timeout: 30000s
7584
- name: upload-results

tests/tasks/setup/kitctl/dataplane.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,3 @@ spec:
4949
sleep 5
5050
done
5151
kubectl --kubeconfig=/tmp/kubeconfig get nodes
52-

0 commit comments

Comments
 (0)