k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/huge-service/modules/measurements.yaml (about)

     1  # Valid actions: "start", "gather"
     2  {{$action := .action}}
     3  
     4  {{$ALLOWED_SLOW_API_CALLS := DefaultParam .CL2_ALLOWED_SLOW_API_CALLS 0}}
     5  {{$HUGE_SERVICE_ALLOWED_SLOW_API_CALLS := DefaultParam .CL2_HUGE_SERVICE_ALLOWED_SLOW_API_CALLS 2}}
     6  {{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT := DefaultParam .CL2_PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT "15m"}}
     7  {{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS := DefaultParam .CL2_ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS false}}
     8  {{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS_SIMPLE := DefaultParam .CL2_ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS_SIMPLE true}}
     9  
    10  {{$CUSTOM_API_CALL_THRESHOLDS := DefaultParam .CUSTOM_API_CALL_THRESHOLDS ""}}
    11  {{$ENABLE_IN_CLUSTER_NETWORK_LATENCY := DefaultParam .CL2_ENABLE_IN_CLUSTER_NETWORK_LATENCY true}}
    12  {{$ENABLE_RESTART_COUNT_CHECK := DefaultParam .ENABLE_RESTART_COUNT_CHECK true}}
    13  {{$ENABLE_SYSTEM_POD_METRICS := DefaultParam .ENABLE_SYSTEM_POD_METRICS true}}
    14  {{$RESTART_COUNT_THRESHOLD_OVERRIDES := DefaultParam .RESTART_COUNT_THRESHOLD_OVERRIDES ""}}
    15  {{$USE_SIMPLE_LATENCY_QUERY := DefaultParam .USE_SIMPLE_LATENCY_QUERY false}}
    16  {{$CLUSTER_OOMS_IGNORED_PROCESSES := DefaultParam .CL2_CLUSTER_OOMS_IGNORED_PROCESSES ""}}
    17  {{$ENABLE_CLUSTER_OOMS_TRACKER := DefaultParam .CL2_ENABLE_CLUSTER_OOMS_TRACKER true}}
    18  {{$ENABLE_CONTAINER_RESTARTS_MEASUREMENT := DefaultParam .CL2_ENABLE_CONTAINER_RESTARTS_MEASUREMENT false}}
    19  {{$ALLOWED_CONTAINER_RESTARTS := DefaultParam .CL2_ALLOWED_CONTAINER_RESTARTS 1}}
    20  {{$CUSTOM_ALLOWED_CONTAINER_RESTARTS := DefaultParam .CL2_CUSTOM_ALLOWED_CONTAINER_RESTARTS ""}}
    21  {{$PROBE_MEASUREMENTS_PING_SLEEP_DURATION := DefaultParam .CL2_PROBE_MEASUREMENTS_PING_SLEEP_DURATION "1s"}}
    22  
    23  {{$allowedSlowCalls := AddInt $ALLOWED_SLOW_API_CALLS $HUGE_SERVICE_ALLOWED_SLOW_API_CALLS}}
    24  
    25  steps:
    26  - name: {{$action}}ing measurements
    27    measurements:
    28    - Identifier: APIResponsivenessPrometheus
    29      Method: APIResponsivenessPrometheus
    30      Params:
    31        action: {{$action}}
    32  {{if not $USE_SIMPLE_LATENCY_QUERY}}
    33        enableViolations: {{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS}}
    34        allowedSlowCalls: {{$allowedSlowCalls}}
    35        customThresholds: {{YamlQuote $CUSTOM_API_CALL_THRESHOLDS 4}}
    36  {{end}}
    37    - Identifier: APIResponsivenessPrometheusSimple
    38      Method: APIResponsivenessPrometheus
    39      Params:
    40        action: {{$action}}
    41        enableViolations: {{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS_SIMPLE}}
    42        useSimpleLatencyQuery: true
    43        summaryName: APIResponsivenessPrometheus_simple
    44        allowedSlowCalls: {{$allowedSlowCalls}}
    45        customThresholds: {{YamlQuote $CUSTOM_API_CALL_THRESHOLDS 4}}
    46    - Identifier: TestMetrics
    47      Method: TestMetrics
    48      Params:
    49        action: {{$action}}
    50        systemPodMetricsEnabled: {{$ENABLE_SYSTEM_POD_METRICS}}
    51        restartCountThresholdOverrides: {{YamlQuote $RESTART_COUNT_THRESHOLD_OVERRIDES 4}}
    52        enableRestartCountCheck: {{$ENABLE_RESTART_COUNT_CHECK}}
    53        clusterOOMsIgnoredProcesses: {{YamlQuote $CLUSTER_OOMS_IGNORED_PROCESSES 4}}
    54        clusterOOMsTrackerEnabled: {{$ENABLE_CLUSTER_OOMS_TRACKER}}
    55  {{if $ENABLE_IN_CLUSTER_NETWORK_LATENCY}}
    56    - Identifier: InClusterNetworkLatency
    57      Method: InClusterNetworkLatency
    58      Params:
    59        action: {{$action}}
    60        checkProbesReadyTimeout: {{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT}}
    61        replicasPerProbe: {{AddInt 2 (DivideInt .Nodes 100)}}
    62        pingSleepDuration: {{$PROBE_MEASUREMENTS_PING_SLEEP_DURATION}}
    63  {{end}}
    64  {{if $ENABLE_CONTAINER_RESTARTS_MEASUREMENT}}
    65    - Identifier: ContainerRestarts
    66      Method: ContainerRestarts
    67      Params:
    68        action: {{$action}}
    69        enableViolations: true
    70        defaultAllowedRestarts: {{$ALLOWED_CONTAINER_RESTARTS}}
    71        customAllowedRestarts: {{YamlQuote $CUSTOM_ALLOWED_CONTAINER_RESTARTS 4}}
    72  {{end}}
    73  - module:
    74      path: ../load/modules/dns-performance-metrics.yaml
    75      params:
    76        action: {{$action}}