Skip to content

Commit fa75b43

Browse files
authored
Merge pull request kubernetes#125550 from sanposhiho/scheduler_perf-gated
add a test case with gated pod-affinity pods to scheduler_perf
2 parents a7832cc + d6d5519 commit fa75b43

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

test/integration/scheduler_perf/config/performance-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,3 +1075,29 @@
10751075
gatedPods: 10000
10761076
deletingPods: 20000
10771077
measurePods: 20000
1078+
1079+
- name: SchedulingGatedPodsWithPodAffinityImpactForThroughput
1080+
defaultPodTemplatePath: config/templates/pod-with-label.yaml
1081+
workloadTemplate:
1082+
- opcode: createNodes
1083+
count: 1
1084+
nodeTemplatePath: config/templates/node-with-name.yaml
1085+
- opcode: createPods
1086+
countParam: $gatedPods
1087+
podTemplatePath: config/templates/gated-pod-with-pod-affinity.yaml
1088+
skipWaitToCompletion: true
1089+
- opcode: sleep
1090+
# To produce a stable scheduler_perf result, here we make sure all gated Pods are stored in the scheduling queue.
1091+
duration: 5s
1092+
- opcode: createPods
1093+
# The scheduling of those Pods will result in many cluster events (AssignedPodAdded)
1094+
# and each of them will be processed by the scheduling queue.
1095+
# But, the scheduling throughput should only be minimally impacted by the number of gated Pods.
1096+
countParam: $measurePods
1097+
collectMetrics: true
1098+
workloads:
1099+
- name: 1000Node
1100+
labels: [performance, fast]
1101+
params:
1102+
gatedPods: 10000
1103+
measurePods: 20000
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
generateName: pod-
5+
labels:
6+
app: scheduler-perf
7+
spec:
8+
affinity:
9+
podAffinity:
10+
requiredDuringSchedulingIgnoredDuringExecution:
11+
- labelSelector:
12+
matchLabels:
13+
app: scheduler-perf
14+
topologyKey: kubernetes.io/hostname
15+
schedulingGates:
16+
- name: "scheduling-gate-1"
17+
containers:
18+
- image: registry.k8s.io/pause:3.10
19+
name: pause

test/integration/scheduler_perf/config/templates/node-with-name.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: v1
22
kind: Node
33
metadata:
44
name: scheduler-perf-node
5+
labels:
6+
kubernetes.io/hostname: scheduler-perf-node
57
spec: {}
68
status:
79
capacity:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
generateName: pod-
5+
labels:
6+
app: scheduler-perf
7+
spec:
8+
containers:
9+
- image: registry.k8s.io/pause:3.10
10+
name: pause

0 commit comments

Comments
 (0)