Skip to content

Commit cb7290f

Browse files
committed
Refactoring to use awscli-cl2-load-with-addons-slos pipeline
1 parent 428d50c commit cb7290f

File tree

7 files changed

+203
-298
lines changed

7 files changed

+203
-298
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{{$namespacePrefix := DefaultParam .CL2_NAMESPACE_PREFIX "default"}}
2+
{{$namespaceCount := DefaultParam .CL2_NAMESPACE_COUNT 1}}
3+
{{$totalEksPodIdentityPods := DefaultParam .CL2_EKS_POD_IDENTITY_PODS 5000}}
4+
{{$timeoutEksPodIdentityPodCreation := DefaultParam .CL2_TIMEOUT_EKS_POD_IDENTITY_POD_CREATION "5m"}}
5+
{{$defaultQps := DefaultParam .CL2_DEFAULT_QPS 500}}
6+
{{$defaultBurst := DefaultParam .CL2_DEFAULT_BURST 1000}}
7+
{{$uniformQps := DefaultParam .CL2_UNIFORM_QPS 500}}
8+
9+
{{$SCHEDULER_THROUGHPUT_THRESHOLD := DefaultParam .CL2_SCHEDULER_THROUGHPUT_THRESHOLD 300}}
10+
11+
name: eks-pod-identity
12+
tuningSets:
13+
# default is a tuningset that is meant to be used when we don't have any specific requirements on pace of operations.
14+
- name: default
15+
globalQPSLoad:
16+
qps: {{$defaultQps}}
17+
burst: {{$defaultBurst}}
18+
- name: UniformQPS
19+
qpsLoad:
20+
qps: {{$uniformQps}}
21+
steps:
22+
- name: Creating eks pod identity measurements
23+
measurements:
24+
- Identifier: EksPodIdentityPodStartupLatency
25+
Method: PodStartupLatency
26+
Params:
27+
action: start
28+
labelSelector: group = eks-pod-identity
29+
threshold: 10s
30+
- Identifier: EksPodIdentity
31+
# TODO: Move to SchedulingThroughputPrometheus which requires cl2 prom stack setup as pre-req
32+
Method: SchedulingThroughput
33+
Params:
34+
action: start
35+
labelSelector: group = eks-pod-identity
36+
measurmentInterval: 1s
37+
# a pod identity association with (namespace: default, sa: default) is created as prerequisite
38+
- name: create eks pod identity pods
39+
phases:
40+
- namespaceRange:
41+
min: 1
42+
max: {{$namespaceCount}}
43+
baseName: {{$namespacePrefix}}
44+
replicasPerNamespace: {{$totalEksPodIdentityPods}}
45+
tuningSet: UniformQPS
46+
objectBundle:
47+
- basename: eks-pod-identity
48+
objectTemplatePath: pod-default.yaml
49+
templateFillMap:
50+
Group: eks-pod-identity
51+
- name: Waiting for eks pod identity pods to be created
52+
measurements:
53+
- Identifier: WaitForEksPodIdentityPods
54+
Method: WaitForRunningPods
55+
Params:
56+
action: gather
57+
timeout: {{$timeoutEksPodIdentityPodCreation}}
58+
desiredPodCount: {{$totalEksPodIdentityPods}}
59+
labelSelector: group = eks-pod-identity
60+
- name: Collecting eks pod identity measurements
61+
measurements:
62+
- Identifier: EksPodIdentityPodStartupLatency
63+
Method: PodStartupLatency
64+
Params:
65+
action: gather
66+
- Identifier: EksPodIdentity
67+
Method: SchedulingThroughput
68+
Params:
69+
action: gather
70+
enableViolations: true
71+
threshold: {{$SCHEDULER_THROUGHPUT_THRESHOLD}}
72+
- name: Delete eks pod identity pods
73+
phases:
74+
- namespaceRange:
75+
min: 1
76+
max: {{$namespaceCount}}
77+
baseName: {{$namespacePrefix}}
78+
replicasPerNamespace: 0
79+
tuningSet: default
80+
objectBundle:
81+
- basename: eks-pod-identity
82+
objectTemplatePath: pod-default.yaml
83+
templateFillMap:
84+
Group: eks-pod-identity
File renamed without changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
generateName: eks-pod-identity-pod-churn-
5+
labels:
6+
group: {{.Group}}
7+
spec:
8+
containers:
9+
- image: registry.k8s.io/pause:3.9
10+
name: pause
11+
initContainers:
12+
- name: app-init
13+
image: amazon/aws-cli:latest
14+
command: ["/bin/sh"]
15+
args: ["-c", "aws sts get-caller-identity"]

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

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ spec:
2121
value: $(params.cluster-name)-node-role
2222
- name: launch-template-stack-name
2323
value: $(params.cluster-name)-launch-template
24+
- name: namespace-count
25+
value: $(params.namespace-count)
2426
retries: 10
2527
taskRef:
2628
kind: Task
@@ -61,6 +63,29 @@ spec:
6163
- default: https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks_node_role.json
6264
name: node-role-cfn-url
6365
type: string
66+
- name: namespace-prefix
67+
default: "default"
68+
description: "The prefix of namespaces for EKS Pod Identity test."
69+
- name: namespace-count
70+
default: "1"
71+
description: "The number of namespaces for EKS Pod Identity test."
72+
- name: pia-trust-policy-url
73+
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/pia-trust-policy.json"
74+
type: string
75+
- name: pia-test-config-url
76+
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/eks-pod-identity/config.yaml"
77+
- name: pia-test-pod-spec-url
78+
default: "https://raw.githubusercontent.com/awslabs/kubernetes-iteration-toolkit/main/tests/assets/eks-pod-identity/eks-pod-identity/pod-default.yaml"
79+
- name: cl2-eks-pod-identity-pods
80+
default: "5000"
81+
- name: cl2-default-qps
82+
default: "500"
83+
- name: cl2-default-burst
84+
default: "1000"
85+
- name: cl2-uniform-qps
86+
default: "500"
87+
- name: timeout-pia-pod-creation
88+
default: "5m"
6489
tasks:
6590
- name: slack-notification
6691
params:
@@ -221,6 +246,66 @@ spec:
221246
workspace: results
222247
- name: config
223248
workspace: config
249+
- name: create-pod-identity-association
250+
params:
251+
- name: cluster-name
252+
value: $(params.cluster-name)
253+
- name: endpoint
254+
value: $(params.endpoint)
255+
- name: namespace-prefix
256+
value: $(params.namespace-prefix)
257+
- name: namespace-count
258+
value: $(params.namespace-count)
259+
- name: pia-trust-policy-url
260+
value: $(params.pia-trust-policy-url)
261+
runAfter:
262+
- generate
263+
taskRef:
264+
kind: Task
265+
name: awscli-eks-pia-create
266+
workspaces:
267+
- name: config
268+
workspace: config
269+
- name: generate-eks-pod-identity
270+
params:
271+
- name: cl2-eks-pod-identity-pods
272+
value: $(params.cl2-eks-pod-identity-pods)
273+
- name: cl2-default-qps
274+
value: $(params.cl2-default-qps)
275+
- name: cl2-default-burst
276+
value: $(params.cl2-default-burst)
277+
- name: cl2-uniform-qps
278+
value: $(params.cl2-uniform-qps)
279+
- name: results-bucket
280+
value: $(params.results-bucket)
281+
- name: nodes
282+
value: $(params.desired-nodes)
283+
- name: cluster-name
284+
value: $(params.cluster-name)
285+
- name: namespace-prefix
286+
value: $(params.namespace-prefix)
287+
- name: namespace-count
288+
value: $(params.namespace-count)
289+
- name: pia-test-config-url
290+
value: $(params.pia-test-config-url)
291+
- name: pia-test-pod-spec-url
292+
value: $(params.pia-test-pod-spec-url)
293+
- name: timeout-pia-pod-creation
294+
value: $(params.timeout-pia-pod-creation)
295+
- name: amp-workspace-id
296+
value: '$(params.amp-workspace-id)'
297+
runAfter:
298+
- create-pod-identity-association
299+
taskRef:
300+
kind: Task
301+
name: load-pod-identity
302+
workspaces:
303+
- name: source
304+
workspace: source
305+
- name: results
306+
workspace: results
307+
- name: config
308+
workspace: config
224309
- name: cw-metrics
225310
params:
226311
- name: dimensions
@@ -230,11 +315,11 @@ spec:
230315
- name: namespace
231316
value: $(params.kubernetes-version)
232317
runAfter:
233-
- generate
318+
- generate-eks-pod-identity
234319
taskRef:
235320
kind: Task
236321
name: cloudwatch
237322
workspaces:
238323
- name: source
239324
- name: results
240-
- name: config
325+
- name: config

0 commit comments

Comments
 (0)