Skip to content

Commit

Permalink
Add separate huge service test config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jupblb committed Dec 13, 2021
1 parent a7a401b commit 3d598ae
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 0 deletions.
26 changes: 26 additions & 0 deletions clusterloader2/testing/huge-service/config.yaml
Original file line number Diff line number Diff line change
@@ -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
48 changes: 48 additions & 0 deletions clusterloader2/testing/huge-service/modules/measurements.yaml
Original file line number Diff line number Diff line change
@@ -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)}}
83 changes: 83 additions & 0 deletions clusterloader2/testing/huge-service/modules/service.yaml
Original file line number Diff line number Diff line change
@@ -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}}
1 change: 1 addition & 0 deletions clusterloader2/testing/huge-service/service.yaml
1 change: 1 addition & 0 deletions clusterloader2/testing/huge-service/simple-deployment.yaml

0 comments on commit 3d598ae

Please sign in to comment.