k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/load/modules/scheduler-throughput.yaml (about)

     1  ## Input params
     2  # Valid actions: "create", "delete"
     3  {{$action := .action}}
     4  {{$namespaces := .namespaces}}
     5  {{$replicasPerNamespace := .replicasPerNamespace}}
     6  {{$schedulerThroughputNamespaces := .schedulerThroughputNamespaces}}
     7  {{$schedulerThroughputPodsPerDeployment := .schedulerThroughputPodsPerDeployment}}
     8  
     9  ## Derivative variables
    10  {{$is_creating := (eq .action "create")}}
    11  
    12  ## CL2 params
    13  {{$SCHEDULER_THROUGHPUT_THRESHOLD := DefaultParam .CL2_SCHEDULER_THROUGHPUT_THRESHOLD 100}}
    14  {{$CHECK_IF_PODS_ARE_UPDATED := DefaultParam .CL2_CHECK_IF_PODS_ARE_UPDATED true}}
    15  
    16  steps:
    17  {{if $is_creating}}
    18  - name: Creating scheduler throughput measurements
    19    measurements:
    20    - Identifier: HighThroughputPodStartupLatency
    21      Method: PodStartupLatency
    22      Params:
    23        action: start
    24        labelSelector: group = scheduler-throughput
    25        threshold: 1h # TODO(https://github.com/kubernetes/perf-tests/issues/1024): Ideally, this should be 5s
    26    - Identifier: WaitForSchedulerThroughputDeployments
    27      Method: WaitForControlledPodsRunning
    28      Params:
    29        action: start
    30        checkIfPodsAreUpdated: {{$CHECK_IF_PODS_ARE_UPDATED}}
    31        apiVersion: apps/v1
    32        kind: Deployment
    33        labelSelector: group = scheduler-throughput
    34        # The operation timeout shouldn't be less than 20m to make sure that ~10m node
    35        # failure won't fail the test. See https://github.com/kubernetes/kubernetes/issues/73461#issuecomment-467338711
    36        operationTimeout: 20m
    37    - Identifier: SchedulingThroughput
    38      Method: SchedulingThroughput
    39      Params:
    40        action: start
    41        labelSelector: group = scheduler-throughput
    42        measurmentInterval: 1s
    43  {{end}}
    44  - name: {{$action}} scheduler throughput pods
    45    phases:
    46    - namespaceRange:
    47        min: {{AddInt $namespaces 1}}
    48        max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
    49      replicasPerNamespace: {{$replicasPerNamespace}}
    50      tuningSet: default
    51      objectBundle:
    52      - basename: scheduler-throughput-deployment
    53        objectTemplatePath: simple-deployment.yaml
    54        templateFillMap:
    55          Replicas: {{$schedulerThroughputPodsPerDeployment}}
    56          Group: scheduler-throughput
    57  - name: Waiting for scheduler throughput pods to be {{$action}}d
    58    measurements:
    59    - Identifier: WaitForSchedulerThroughputDeployments
    60      Method: WaitForControlledPodsRunning
    61      Params:
    62        action: gather
    63  {{if $is_creating}}
    64  - name: Collecting scheduler throughput measurements
    65    measurements:
    66    - Identifier: HighThroughputPodStartupLatency
    67      Method: PodStartupLatency
    68      Params:
    69        action: gather
    70    - Identifier: SchedulingThroughput
    71      Method: SchedulingThroughput
    72      Params:
    73        action: gather
    74        enableViolations: true
    75        threshold: {{$SCHEDULER_THROUGHPUT_THRESHOLD}}
    76  {{end}}