From 9525798c35d1ce159bad5df31f63147478242af0 Mon Sep 17 00:00:00 2001 From: Pavithra Ramesh Date: Thu, 1 Aug 2019 01:13:53 -0700 Subject: [PATCH] Added a simple scale test for L4 ILB Incorporated review comments from @krzseid --- clusterloader2/testing/l4ilb/config.yaml | 120 ++++++++++++++++++++++ clusterloader2/testing/l4ilb/dep.yaml | 19 ++++ clusterloader2/testing/l4ilb/service.yaml | 13 +++ 3 files changed, 152 insertions(+) create mode 100644 clusterloader2/testing/l4ilb/config.yaml create mode 100644 clusterloader2/testing/l4ilb/dep.yaml create mode 100644 clusterloader2/testing/l4ilb/service.yaml diff --git a/clusterloader2/testing/l4ilb/config.yaml b/clusterloader2/testing/l4ilb/config.yaml new file mode 100644 index 0000000000..7f9f5aa8fb --- /dev/null +++ b/clusterloader2/testing/l4ilb/config.yaml @@ -0,0 +1,120 @@ +#Constants +{{$LARGE_BACKEND_SIZE := 300}} +{{$MEDIUM_BACKEND_SIZE := 150}} +{{$SMALL_BACKEND_SIZE := 10}} +# adding a fixed value for first version of the test, rate of pod creation not a concern yet. +{{$ilbQPS := 500}} +{{$namespaces := 1}} +#Test +name: ilbload +automanagedNamespaces: {{$namespaces}} +tuningSets: +- name: ILBConstantQPS + qpsLoad: + averageQps: {{$ilbQPS}} +steps: +# Create ILBs +- measurements: + - Identifier: ServiceCreationLatency + Method: ServiceCreationLatency + Params: + action: start + - Identifier: WaitForRunningDeployments + Method: WaitForControlledPodsRunning + Params: + action: start + apiVersion: apps/v1 + kind: Deployment + operationTimeout: 15m + +- phases: + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 1 + tuningSet: ILBConstantQPS + objectBundle: + - basename: large-backends-dep + objectTemplatePath: dep.yaml + templateFillMap: + ReplicasMin: {{$LARGE_BACKEND_SIZE}} + ReplicasMax: {{$LARGE_BACKEND_SIZE}} + - basename: large-backends-service + objectTemplatePath: service.yaml + templateFillMap: + DeploymentBaseName: large-backends-dep +- phases: + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 1 + tuningSet: ILBConstantQPS + objectBundle: + - basename: medium-backends-dep + objectTemplatePath: dep.yaml + templateFillMap: + ReplicasMin: {{$MEDIUM_BACKEND_SIZE}} + ReplicasMax: {{$MEDIUM_BACKEND_SIZE}} + - basename: medium-backends-service + objectTemplatePath: service.yaml + templateFillMap: + DeploymentBaseName: medium-backends-dep + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 1 + tuningSet: ILBConstantQPS + objectBundle: + - basename: small-backends-dep + objectTemplatePath: dep.yaml + templateFillMap: + ReplicasMin: {{$SMALL_BACKEND_SIZE}} + ReplicasMax: {{$SMALL_BACKEND_SIZE}} + - basename: small-backends-service + objectTemplatePath: service.yaml + templateFillMap: + DeploymentBaseName: small-backends-dep +- name: Creating ILBs +- measurements: + - Identifier: ServiceCreationLatency + Method: ServiceCreationLatency + Params: + action: waitForReady +# Delete ILBs +- phases: + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 0 + tuningSet: ILBConstantQPS + objectBundle: + - basename: large-backends-service + objectTemplatePath: service.yaml + - basename: large-backends-dep + objectTemplatePath: dep.yaml + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 0 + tuningSet: ILBConstantQPS + objectBundle: + - basename: medium-backends-service + objectTemplatePath: service.yaml + - basename: medium-backends-dep + objectTemplatePath: dep.yaml + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 0 + tuningSet: ILBConstantQPS + objectBundle: + - basename: small-backends-service + objectTemplatePath: service.yaml + - basename: small-backends-dep + objectTemplatePath: dep.yaml +- name: Deleting ILBs +- measurements: + - Identifier: ServiceCreationLatency + Method: ServiceCreationLatency + Params: + action: gather diff --git a/clusterloader2/testing/l4ilb/dep.yaml b/clusterloader2/testing/l4ilb/dep.yaml new file mode 100644 index 0000000000..170b73d05d --- /dev/null +++ b/clusterloader2/testing/l4ilb/dep.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{.Name}} +spec: + replicas: {{RandIntRange .ReplicasMin .ReplicasMax}} + selector: + matchLabels: + name: {{.Name}} + template: + metadata: + labels: + name: {{.Name}} + spec: + containers: + - name: {{.Name}} + image: nginx + ports: + - containerPort: 8080 diff --git a/clusterloader2/testing/l4ilb/service.yaml b/clusterloader2/testing/l4ilb/service.yaml new file mode 100644 index 0000000000..2ed7fa60af --- /dev/null +++ b/clusterloader2/testing/l4ilb/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{.Name}} + annotations: + cloud.google.com/load-balancer-type: "Internal" +spec: + type: LoadBalancer + selector: + name: {{.DeploymentBaseName}}-{{.Index}} + ports: + - port: 8080 + targetPort: 80