add a test case with PodAffinity gated pods to scheduler_perf

This commit is contained in:
Kensei Nakada 2024-06-17 18:34:08 +00:00
parent 7c780186d7
commit d6d55196ae
4 changed files with 57 additions and 0 deletions

View File

@ -1075,3 +1075,29 @@
gatedPods: 10000
deletingPods: 20000
measurePods: 20000
- name: SchedulingGatedPodsWithPodAffinityImpactForThroughput
defaultPodTemplatePath: config/templates/pod-with-label.yaml
workloadTemplate:
- opcode: createNodes
count: 1
nodeTemplatePath: config/templates/node-with-name.yaml
- opcode: createPods
countParam: $gatedPods
podTemplatePath: config/templates/gated-pod-with-pod-affinity.yaml
skipWaitToCompletion: true
- opcode: sleep
# To produce a stable scheduler_perf result, here we make sure all gated Pods are stored in the scheduling queue.
duration: 5s
- opcode: createPods
# The scheduling of those Pods will result in many cluster events (AssignedPodAdded)
# and each of them will be processed by the scheduling queue.
# But, the scheduling throughput should only be minimally impacted by the number of gated Pods.
countParam: $measurePods
collectMetrics: true
workloads:
- name: 1000Node
labels: [performance, fast]
params:
gatedPods: 10000
measurePods: 20000

View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Pod
metadata:
generateName: pod-
labels:
app: scheduler-perf
spec:
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: scheduler-perf
topologyKey: kubernetes.io/hostname
schedulingGates:
- name: "scheduling-gate-1"
containers:
- image: registry.k8s.io/pause:3.10
name: pause

View File

@ -2,6 +2,8 @@ apiVersion: v1
kind: Node
metadata:
name: scheduler-perf-node
labels:
kubernetes.io/hostname: scheduler-perf-node
spec: {}
status:
capacity:

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Pod
metadata:
generateName: pod-
labels:
app: scheduler-perf
spec:
containers:
- image: registry.k8s.io/pause:3.10
name: pause