Skip to content

Commit 41757c8

Browse files
authored
Switch to use daemonset deployment for image preload (#535)
* Switch to forked branch on perf-tests in pod identity load tests * Switch to use daemonset deployment for image preload * Adjust resource limit
1 parent eef29f9 commit 41757c8

File tree

4 files changed

+75
-2
lines changed

4 files changed

+75
-2
lines changed

tests/assets/eks-pod-identity/config.yaml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
{{$podImage := DefaultParam .CL2_POD_IMAGE "public.ecr.aws/aws-cli/aws-cli:2.27.56"}}
1010
{{$timeoutEksPodIdentityPodCreation := DefaultParam .CL2_TIMEOUT_EKS_POD_IDENTITY_POD_CREATION "20m"}}
1111
{{$timeoutEksPodIdentityPodStartup := DefaultParam .CL2_TIMEOUT_EKS_POD_IDENTITY_POD_STARTUP "5m"}}
12+
{{$timeoutImagePreload := DefaultParam .CL2_TIMEOUT_IMAGE_PRELOAD "15m"}}
1213
{{$defaultQps := DefaultParam .CL2_DEFAULT_QPS 500}}
1314
{{$defaultBurst := DefaultParam .CL2_DEFAULT_BURST 1000}}
1415
{{$uniformQps := DefaultParam .CL2_UNIFORM_QPS 500}}
@@ -26,6 +27,37 @@ tuningSets:
2627
qpsLoad:
2728
qps: {{$uniformQps}}
2829
steps:
30+
- name: Creating image preload measurements
31+
measurements:
32+
- Method: WaitForControlledPodsRunning
33+
Instances:
34+
- Identifier: WaitForRunningDaemonSets
35+
Params:
36+
apiVersion: apps/v1
37+
kind: DaemonSet
38+
Params:
39+
action: start
40+
labelSelector: group = image-preload
41+
operationTimeout: {{$timeoutImagePreload}}
42+
- name: Create image preload daemonset
43+
phases:
44+
- namespaceRange:
45+
min: 1
46+
max: 1
47+
replicasPerNamespace: 1
48+
tuningSet: default
49+
objectBundle:
50+
- basename: daemonset
51+
objectTemplatePath: pod-image-preload.yaml
52+
templateFillMap:
53+
PodImage: {{$podImage}}
54+
- name: Waiting for image preload daemonset to be completed
55+
measurements:
56+
- Method: WaitForControlledPodsRunning
57+
Instances:
58+
- Identifier: WaitForRunningDaemonSets
59+
Params:
60+
action: gather
2961
- name: Creating eks pod identity measurements
3062
measurements:
3163
- Identifier: EksPodIdentityPodStartupLatency
@@ -35,7 +67,7 @@ steps:
3567
labelSelector: group = eks-pod-identity
3668
threshold: {{$timeoutEksPodIdentityPodStartup}}
3769
# a pod identity association with (namespace: default, sa: default) is created as prerequisite
38-
- name: create eks pod identity pods
70+
- name: Create eks pod identity pods
3971
phases:
4072
- namespaceRange:
4173
min: 1
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: image-preload
5+
labels:
6+
group: image-preload
7+
spec:
8+
selector:
9+
matchLabels:
10+
name: image-preload
11+
template:
12+
metadata:
13+
labels:
14+
group: image-preload
15+
name: image-preload
16+
spec:
17+
containers:
18+
- name: image-preload
19+
image: {{.PodImage}}
20+
resources:
21+
requests:
22+
cpu: "10m"
23+
memory: "10Mi"
24+
limits:
25+
cpu: "15m"
26+
memory: "15Mi"
27+
command:
28+
- sh
29+
- -c
30+
- |
31+
while true; do
32+
echo "Sleeping for 1 hour..."
33+
sleep 3600
34+
done

tests/tekton-resources/pipelines/eks/awscli-cl2-load-with-addons-slos.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ spec:
7979
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/config.yaml"
8080
- name: pia-test-pod-spec-url
8181
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/pod-default.yaml"
82+
- name: pia-image-preload-spec-url
83+
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/pod-image-preload.yaml"
8284
- name: cl2-eks-pod-identity-pods
8385
default: "5000"
8486
- name: cl2-default-qps
@@ -320,6 +322,8 @@ spec:
320322
value: $(params.pia-test-config-url)
321323
- name: pia-test-pod-spec-url
322324
value: $(params.pia-test-pod-spec-url)
325+
- name: pia-image-preload-spec-url
326+
value: $(params.pia-image-preload-spec-url)
323327
- name: timeout-pia-pod-creation
324328
value: $(params.timeout-pia-pod-creation)
325329
- name: timeout-pia-pod-startup

tests/tekton-resources/tasks/generators/clusterloader/load-pod-identity.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ spec:
6464
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/config.yaml"
6565
- name: pia-test-pod-spec-url
6666
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/pod-default.yaml"
67+
- name: pia-image-preload-spec-url
68+
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/pod-image-preload.yaml"
6769
- name: timeout-pia-pod-creation
6870
default: "20m"
6971
- name: timeout-pia-pod-startup
@@ -181,16 +183,17 @@ spec:
181183
mkdir -p $(workspaces.source.path)/perf-tests/clusterloader2/testing/eks-pod-identity
182184
curl -s $(params.pia-test-config-url) -o $(workspaces.source.path)/perf-tests/clusterloader2/testing/eks-pod-identity/config.yaml
183185
curl -s $(params.pia-test-pod-spec-url) -o $(workspaces.source.path)/perf-tests/clusterloader2/testing/eks-pod-identity/pod-default.yaml
186+
curl -s $(params.pia-image-preload-spec-url) -o $(workspaces.source.path)/perf-tests/clusterloader2/testing/eks-pod-identity/pod-image-preload.yaml
184187
cat $(workspaces.source.path)/perf-tests/clusterloader2/testing/eks-pod-identity/config.yaml
185188
cat $(workspaces.source.path)/perf-tests/clusterloader2/testing/eks-pod-identity/pod-default.yaml
189+
cat $(workspaces.source.path)/perf-tests/clusterloader2/testing/eks-pod-identity/pod-image-preload.yaml
186190
cd $(workspaces.source.path)/perf-tests/clusterloader2/
187191
188192
ENABLE_EXEC_SERVICE=false ./clusterloader \
189193
--kubeconfig=$KUBECONFIG \
190194
--testconfig=$(workspaces.source.path)/perf-tests/clusterloader2/testing/eks-pod-identity/config.yaml \
191195
--testoverrides=$(workspaces.source.path)/overrides.yaml \
192196
--nodes=$(params.nodes) --provider=eks --report-dir=$(workspaces.results.path) \
193-
--node-preload-images=$(params.pod-image) \
194197
--alsologtostderr --v=2
195198
exit_code=$?
196199
if [ $exit_code -eq 0 ]; then

0 commit comments

Comments
 (0)