k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/l4ilb/config-ilb-recovery.yaml (about)

     1  # Timer measurement is used to measure the time between the start of an action executed by the
     2  # Exec command and when the ILB services are running and reachable.
     3  # ServiceCreationLatency measurement is used only for determining the moment when all of the
     4  # ILBs are reachable. Since it reports time based on the initial creation of the service, and
     5  # not from the start of the action, the measured time will not be shown.
     6  
     7  # Constants
     8  {{$LB_REPLICAS_PER_NS := DefaultParam .CL2_LB_REPLICAS_PER_NS 5}}
     9  {{$LB_BACKEND_SIZE := DefaultParam .CL2_LB_BACKEND_SIZE 10}}
    10  {{$EXTERNAL_TRAFFIC_POLICY := DefaultParam .CL2_EXTERNAL_TRAFFIC_POLICY "Cluster"}}
    11  {{$ilbWaitTimeout := DefaultParam .CL2_ILB_WAIT_TIMEOUT "10m"}}
    12  {{$ilbQPS := DefaultParam .CL2_ILB_TEST_QPS 20}}
    13  {{$ILB_RECOVERY_LABEL := "ilb-recovery"}}
    14  {{$namespaces := 1}}
    15  
    16  # Command to be executed
    17  {{$EXEC_COMMAND := DefaultParam .CL2_EXEC_COMMAND nil}}
    18  {{$EXEC_TIMEOUT := DefaultParam .CL2_EXEC_TIMEOUT "60m"}}
    19  {{$EXEC_ADDITIONAL_ARGUMENT := DefaultParam .CL2_EXEC_ADDITIONAL_ARGUMENT ""}}
    20  
    21  name: l4ilb-recovery
    22  namespace:
    23    number: {{$namespaces}}
    24  tuningSets:
    25  - name: ILBConstantQPS
    26    qpsLoad:
    27      qps: {{$ilbQPS}}
    28  steps:
    29  - name: Start measurement for running pods
    30    measurements:
    31    - Identifier: WaitForRunningDeployments
    32      Method: WaitForControlledPodsRunning
    33      Params:
    34        action: start
    35        apiVersion: apps/v1
    36        kind: Deployment
    37        labelSelector: group = ilb-load
    38        operationTimeout: 15m
    39  - name: Creating ILBs
    40    phases:
    41    - namespaceRange:
    42        min: 1
    43        max: {{$namespaces}}
    44      replicasPerNamespace: {{$LB_REPLICAS_PER_NS}}
    45      tuningSet: ILBConstantQPS
    46      objectBundle:
    47      - basename: ilb-service
    48        objectTemplatePath: service.yaml
    49        templateFillMap:
    50          DeploymentBaseName: ilb-dep
    51          ExternalTrafficPolicy: {{$EXTERNAL_TRAFFIC_POLICY}}
    52          ILBSizeLabel: {{$ILB_RECOVERY_LABEL}}
    53      - basename: ilb-dep
    54        objectTemplatePath: dep.yaml
    55        templateFillMap:
    56          NumReplicas: {{$LB_BACKEND_SIZE}}
    57  - name: Waiting for objects creation to be completed
    58    measurements:
    59    - Identifier: WaitForRunningDeployments
    60      Method: WaitForControlledPodsRunning
    61      Params:
    62        action: gather
    63  {{if $EXEC_COMMAND}}
    64  - name: Starting measurements
    65    measurements:
    66    - Identifier: ServiceCreationLatency
    67      Method: ServiceCreationLatency
    68      Params:
    69        action: start
    70        waitTimeout: {{$ilbWaitTimeout}}
    71        labelSelector: size = {{$ILB_RECOVERY_LABEL}}
    72  - name: Starting ILB recovery timer
    73    measurements:
    74    - Identifier: ILBRecoveryTimer
    75      Method: Timer
    76      Params:
    77        action: start
    78        label: {{$ILB_RECOVERY_LABEL}}
    79  - name: Execute command
    80    measurements:
    81    - Identifier: ExecCommand
    82      Method: Exec
    83      Params:
    84        timeout: {{$EXEC_TIMEOUT}}
    85        command:
    86        {{range $EXEC_COMMAND}}
    87        - {{.}}
    88        {{end}}
    89        {{if $EXEC_ADDITIONAL_ARGUMENT}}
    90        - {{$EXEC_ADDITIONAL_ARGUMENT}}
    91        {{end}}
    92  - name: Waiting for ILBs to be reachable after the command is executed
    93    measurements:
    94    - Identifier: ServiceCreationLatency
    95      Method: ServiceCreationLatency
    96      Params:
    97        action: waitForReady
    98  - name: Stopping ILB recovery timer
    99    measurements:
   100    - Identifier: ILBRecoveryTimer
   101      Method: Timer
   102      Params:
   103        action: stop
   104        label: {{$ILB_RECOVERY_LABEL}}
   105  {{end}}
   106  - name: Deleting ILBs
   107    phases:
   108    - namespaceRange:
   109        min: 1
   110        max: {{$namespaces}}
   111      replicasPerNamespace: 0
   112      tuningSet: ILBConstantQPS
   113      objectBundle:
   114      - basename: ilb-service
   115        objectTemplatePath: service.yaml
   116      - basename: ilb-dep
   117        objectTemplatePath: dep.yaml
   118  - name: Waiting for objects deletion to be completed
   119    measurements:
   120    - Identifier: WaitForRunningDeployments
   121      Method: WaitForControlledPodsRunning
   122      Params:
   123        action: gather
   124  - name: Gathering measurements
   125    measurements:
   126    - Identifier: ILBRecoveryTimer
   127      Method: Timer
   128      Params:
   129        action: gather
   130        label: {{$ILB_RECOVERY_LABEL}}