From 3d598aee90cc218c08dfce68e2d9501a1e144dc8 Mon Sep 17 00:00:00 2001 From: jupblb Date: Wed, 8 Dec 2021 17:57:57 +0100 Subject: [PATCH] Add separate huge service test config We want to decouple scheduler throughput from huge service test. In order to do so, a separate test needs to be implemented. Since we do not test for huge services everywhere, it is done in a separate file. The default number of endpoints for the new huge service test is 1000 instead of the number of nodes. --- .../testing/huge-service/config.yaml | 26 ++++++ .../huge-service/modules/measurements.yaml | 48 +++++++++++ .../testing/huge-service/modules/service.yaml | 83 +++++++++++++++++++ .../testing/huge-service/service.yaml | 1 + .../huge-service/simple-deployment.yaml | 1 + 5 files changed, 159 insertions(+) create mode 100644 clusterloader2/testing/huge-service/config.yaml create mode 100644 clusterloader2/testing/huge-service/modules/measurements.yaml create mode 100644 clusterloader2/testing/huge-service/modules/service.yaml create mode 120000 clusterloader2/testing/huge-service/service.yaml create mode 120000 clusterloader2/testing/huge-service/simple-deployment.yaml diff --git a/clusterloader2/testing/huge-service/config.yaml b/clusterloader2/testing/huge-service/config.yaml new file mode 100644 index 0000000000..32f46547f7 --- /dev/null +++ b/clusterloader2/testing/huge-service/config.yaml @@ -0,0 +1,26 @@ +# Huge service test config +{{$HUGE_SERVICE_HEADLESS := DefaultParam .CL2_HUGE_SERVICE_HEADLESS false}} +{{$HUGE_SERVICE_ENDPOINTS := DefaultParam .CL2_HUGE_SERVICE_ENDPOINTS 1000}} + +name: huge-service +namespace: + number: 1 +tuningSets: +- name: Sequence + parallelismLimitedLoad: + parallelismLimit: 1 +steps: +- module: + path: modules/measurements.yaml + params: + action: start +- module: + path: modules/service.yaml + params: + endpoints: {{$HUGE_SERVICE_ENDPOINTS}} + isHeadless: {{$HUGE_SERVICE_HEADLESS}} + serviceName: huge-service +- module: + path: modules/measurements.yaml + params: + action: gather diff --git a/clusterloader2/testing/huge-service/modules/measurements.yaml b/clusterloader2/testing/huge-service/modules/measurements.yaml new file mode 100644 index 0000000000..f6c177c8cf --- /dev/null +++ b/clusterloader2/testing/huge-service/modules/measurements.yaml @@ -0,0 +1,48 @@ +# Valid actions: "start", "gather" +{{$action := .action}} + +{{$ALLOWED_SLOW_API_CALLS := DefaultParam .CL2_ALLOWED_SLOW_API_CALLS 0}} +{{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT := DefaultParam .CL2_PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT "15m"}} +{{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS := DefaultParam .CL2_ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS false}} +{{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS_SIMPLE := DefaultParam .CL2_ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS_SIMPLE true}} + +{{$CUSTOM_API_CALL_THRESHOLDS := DefaultParam .CUSTOM_API_CALL_THRESHOLDS ""}} +{{$ENABLE_RESTART_COUNT_CHECK := DefaultParam .ENABLE_RESTART_COUNT_CHECK true}} +{{$ENABLE_SYSTEM_POD_METRICS := DefaultParam .ENABLE_SYSTEM_POD_METRICS true}} +{{$RESTART_COUNT_THRESHOLD_OVERRIDES := DefaultParam .RESTART_COUNT_THRESHOLD_OVERRIDES ""}} +{{$USE_SIMPLE_LATENCY_QUERY := DefaultParam .USE_SIMPLE_LATENCY_QUERY false}} + +steps: +- name: {{$action}}ing measurements + measurements: + - Identifier: APIResponsivenessPrometheus + Method: APIResponsivenessPrometheus + Params: + action: {{$action}} +{{if not $USE_SIMPLE_LATENCY_QUERY}} + enableViolations: {{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS}} + allowedSlowCalls: {{$ALLOWED_SLOW_API_CALLS}} + customThresholds: {{YamlQuote $CUSTOM_API_CALL_THRESHOLDS 4}} +{{end}} + - Identifier: APIResponsivenessPrometheusSimple + Method: APIResponsivenessPrometheus + Params: + action: {{$action}} + enableViolations: {{$ENABLE_VIOLATIONS_FOR_API_CALL_PROMETHEUS_SIMPLE}} + useSimpleLatencyQuery: true + summaryName: APIResponsivenessPrometheus_simple + allowedSlowCalls: {{$ALLOWED_SLOW_API_CALLS}} + customThresholds: {{YamlQuote $CUSTOM_API_CALL_THRESHOLDS 4}} + - Identifier: TestMetrics + Method: TestMetrics + Params: + action: {{$action}} + systemPodMetricsEnabled: {{$ENABLE_SYSTEM_POD_METRICS}} + restartCountThresholdOverrides: {{YamlQuote $RESTART_COUNT_THRESHOLD_OVERRIDES 4}} + enableRestartCountCheck: {{$ENABLE_RESTART_COUNT_CHECK}} + - Identifier: InClusterNetworkLatency + Method: InClusterNetworkLatency + Params: + action: {{$action}} + checkProbesReadyTimeout: {{$PROBE_MEASUREMENTS_CHECK_PROBES_READY_TIMEOUT}} + replicasPerProbe: {{AddInt 2 (DivideInt .Nodes 100)}} diff --git a/clusterloader2/testing/huge-service/modules/service.yaml b/clusterloader2/testing/huge-service/modules/service.yaml new file mode 100644 index 0000000000..2f5240b98c --- /dev/null +++ b/clusterloader2/testing/huge-service/modules/service.yaml @@ -0,0 +1,83 @@ +{{$endpoints := .endpoints}} +{{$isHeadless := .isHeadless}} +{{$serviceName := .serviceName}} + +steps: +- name: Create {{$serviceName}} + phases: + - namespaceRange: + min: 1 + max: 1 + replicasPerNamespace: 1 + tuningSet: Sequence + objectBundle: + - basename: {{$serviceName}} + objectTemplatePath: service.yaml + templateFillMap: + HeadlessService: {{$isHeadless}} +- name: Creating {{$serviceName}} measurements + measurements: + - Identifier: WaitForHugeServiceDeployments + Method: WaitForControlledPodsRunning + Params: + action: start + apiVersion: apps/v1 + kind: Deployment + labelSelector: group = {{$serviceName}} + operationTimeout: 20m +- name: Creating {{$serviceName}} pods + phases: + - namespaceRange: + min: 1 + max: 1 + replicasPerNamespace: 1 + tuningSet: Sequence + objectBundle: + - basename: huge-service-deployment + objectTemplatePath: simple-deployment.yaml + templateFillMap: + Replicas: {{$endpoints}} + Group: huge-service + CpuRequest: 1m + MemoryRequest: 10M + SvcName: {{$serviceName}} +- name: Waiting for {{$serviceName}} pods to be created + measurements: + - Identifier: WaitForHugeServiceDeployments + Method: WaitForControlledPodsRunning + Params: + action: gather +- name: Deleting {{$serviceName}} pods + phases: + - namespaceRange: + min: 1 + max: 1 + replicasPerNamespace: 1 + tuningSet: Sequence + objectBundle: + - basename: huge-service-deployment + objectTemplatePath: simple-deployment.yaml + templateFillMap: + Replicas: {{$endpoints}} + Group: {{$serviceName}} + CpuRequest: 1m + MemoryRequest: 10M + SvcName: {{$serviceName}} +- name: Waiting for {{$serviceName}} pods to be deleted + measurements: + - Identifier: WaitForHugeServiceDeployments + Method: WaitForControlledPodsRunning + Params: + action: gather +- name: Delete {{$serviceName}} + phases: + - namespaceRange: + min: 1 + max: 1 + replicasPerNamespace: 0 + tuningSet: Sequence + objectBundle: + - basename: {{$serviceName}} + objectTemplatePath: service.yaml + templateFillMap: + HeadlessService: {{$isHeadless}} diff --git a/clusterloader2/testing/huge-service/service.yaml b/clusterloader2/testing/huge-service/service.yaml new file mode 120000 index 0000000000..81ead7b05c --- /dev/null +++ b/clusterloader2/testing/huge-service/service.yaml @@ -0,0 +1 @@ +../load/service.yaml \ No newline at end of file diff --git a/clusterloader2/testing/huge-service/simple-deployment.yaml b/clusterloader2/testing/huge-service/simple-deployment.yaml new file mode 120000 index 0000000000..b8d885b9e9 --- /dev/null +++ b/clusterloader2/testing/huge-service/simple-deployment.yaml @@ -0,0 +1 @@ +../load/simple-deployment.yaml \ No newline at end of file