|
| 1 | +# ASSUMPTIONS: |
| 2 | +# - This test is designed for 1-node cluster. |
| 3 | +# - Pods take less than 1 second to start, so we can launch them at a rate of 1 pod per second without creating a backlog. |
| 4 | + |
| 5 | +#Constants |
| 6 | +{{$POD_COUNT := DefaultParam .POD_COUNT 30}} |
| 7 | +{{$POD_THROUGHPUT := DefaultParam .POD_THROUGHPUT 1}} # We expect the pod to launch in less than one second, so launching more than 1 pod per second would create a backlog and test a different behaviour. |
| 8 | +{{$CONTAINER_IMAGE := DefaultParam .CONTAINER_IMAGE "registry.k8s.io/pause:3.9"}} |
| 9 | +{{$POD_STARTUP_LATENCY_THRESHOLD := DefaultParam .POD_STARTUP_LATENCY_THRESHOLD "5s"}} |
| 10 | +{{$OPERATION_TIMEOUT := DefaultParam .OPERATION_TIMEOUT "15m"}} |
| 11 | + |
| 12 | +name: pod-startup-latency |
| 13 | +namespace: |
| 14 | + number: {{$POD_COUNT}} |
| 15 | +tuningSets: |
| 16 | +- name: UniformQPS |
| 17 | + qpsLoad: |
| 18 | + qps: {{$POD_THROUGHPUT}} |
| 19 | +steps: |
| 20 | +- name: Starting measurements |
| 21 | + measurements: |
| 22 | + - Identifier: APIResponsivenessPrometheusSimple |
| 23 | + Method: APIResponsivenessPrometheus |
| 24 | + Params: |
| 25 | + action: start |
| 26 | + - Identifier: PodStartupLatency |
| 27 | + Method: PodStartupLatency |
| 28 | + Params: |
| 29 | + action: start |
| 30 | + labelSelector: group = latency |
| 31 | + threshold: {{$POD_STARTUP_LATENCY_THRESHOLD}} |
| 32 | +- name: Starting pods measurements |
| 33 | + measurements: |
| 34 | + - Identifier: WaitForRunningLatencyRCs |
| 35 | + Method: WaitForControlledPodsRunning |
| 36 | + Params: |
| 37 | + action: start |
| 38 | + apiVersion: v1 |
| 39 | + kind: ReplicationController |
| 40 | + labelSelector: group = latency |
| 41 | + operationTimeout: {{$OPERATION_TIMEOUT}} |
| 42 | +- name: Creating pods |
| 43 | + phases: |
| 44 | + - namespaceRange: |
| 45 | + min: 1 |
| 46 | + max: {{$POD_COUNT}} |
| 47 | + replicasPerNamespace: 1 |
| 48 | + tuningSet: UniformQPS |
| 49 | + objectBundle: |
| 50 | + - basename: latency-pod-rc |
| 51 | + objectTemplatePath: rc.yaml |
| 52 | + templateFillMap: |
| 53 | + Replicas: 1 |
| 54 | + Group: latency |
| 55 | + Image: {{$CONTAINER_IMAGE}} |
| 56 | +- name: Waiting for pods to be running |
| 57 | + measurements: |
| 58 | + - Identifier: WaitForRunningLatencyRCs |
| 59 | + Method: WaitForControlledPodsRunning |
| 60 | + Params: |
| 61 | + action: gather |
| 62 | +- name: Deleting pods |
| 63 | + phases: |
| 64 | + - namespaceRange: |
| 65 | + min: 1 |
| 66 | + max: {{$POD_COUNT}} |
| 67 | + replicasPerNamespace: 0 |
| 68 | + tuningSet: UniformQPS |
| 69 | + objectBundle: |
| 70 | + - basename: latency-pod-rc |
| 71 | + objectTemplatePath: rc.yaml |
| 72 | +- name: Waiting for pods to be deleted |
| 73 | + measurements: |
| 74 | + - Identifier: WaitForRunningLatencyRCs |
| 75 | + Method: WaitForControlledPodsRunning |
| 76 | + Params: |
| 77 | + action: gather |
| 78 | +# Collect measurements |
| 79 | +- name: Collecting pods measurements |
| 80 | + measurements: |
| 81 | + - Identifier: PodStartupLatency |
| 82 | + Method: PodStartupLatency |
| 83 | + Params: |
| 84 | + action: gather |
| 85 | +- name: Collecting measurements |
| 86 | + measurements: |
| 87 | + - Identifier: APIResponsivenessPrometheusSimple |
| 88 | + Method: APIResponsivenessPrometheus |
| 89 | + Params: |
| 90 | + action: gather |
| 91 | + enableViolations: true |
| 92 | + useSimpleLatencyQuery: true |
| 93 | + summaryName: APIResponsivenessPrometheus_simple |
0 commit comments