diff --git a/test/integration/scheduler_perf/config/performance-config.yaml b/test/integration/scheduler_perf/config/performance-config.yaml index 0c2822e7779..0ec3c43727c 100644 --- a/test/integration/scheduler_perf/config/performance-config.yaml +++ b/test/integration/scheduler_perf/config/performance-config.yaml @@ -1383,3 +1383,39 @@ params: gatedPods: 10000 measurePods: 20000 + +# This test case simulates the scheduling when pods selected to schedule have deletionTimestamp set. +# There was a memory leak related to this path of code fixed in: +# https://github.com/kubernetes/kubernetes/pull/126962 +# Main goal of this test case is to verify if InFlightEvents is empty after the test. +- name: SchedulingDeletedPodsWithFinalizers + featureGates: + SchedulerQueueingHints: true + defaultPodTemplatePath: config/templates/light-pod.yaml + workloadTemplate: + - opcode: createNodes + countParam: $initNodes + - opcode: createPods + # Create pods with finalizers and delete them before they are scheduled. + # DeletionTimestamp field should be populated then, + # but a few pods should still be chosen into the scheduling. + countParam: $deletingPods + podTemplatePath: config/templates/pod-with-finalizer.yaml + skipWaitToCompletion: true + deletePodsPerSecond: 100 + - opcode: createPods + countParam: $measurePods + collectMetrics: true + workloads: + - name: 10Node_100DeletingPods + labels: [integration-test, fast] + params: + initNodes: 10 + deletingPods: 100 + measurePods: 10 + - name: 1000Node_1000DeletingPods + labels: [performance, fast] + params: + initNodes: 1000 + deletingPods: 1000 + measurePods: 1000 diff --git a/test/integration/scheduler_perf/config/templates/pod-with-finalizer.yaml b/test/integration/scheduler_perf/config/templates/pod-with-finalizer.yaml new file mode 100644 index 00000000000..f8e11d688b2 --- /dev/null +++ b/test/integration/scheduler_perf/config/templates/pod-with-finalizer.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Pod +metadata: + generateName: pod- + finalizers: + - test.k8s.io/finalizer +spec: + containers: + - image: registry.k8s.io/pause:3.10 + name: pause