diff --git a/clusterloader2/testing/l4ilb/config.yaml b/clusterloader2/testing/l4ilb/config.yaml new file mode 100644 index 0000000000..f4a9b54df5 --- /dev/null +++ b/clusterloader2/testing/l4ilb/config.yaml @@ -0,0 +1,153 @@ +#Constants +{{$LARGE_BACKEND_SIZE := 300}} +{{$MEDIUM_BACKEND_SIZE := 150}} +{{$SMALL_BACKEND_SIZE := 10}} +{{$LARGE_BACKEND_LABEL := "ilblarge"}} +{{$MEDIUM_BACKEND_LABEL := "ilbmedium"}} +{{$SMALL_BACKEND_LABEL := "ilbsmall"}} +# 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: ServiceCreationLatencyLarge + Method: ServiceCreationLatency + Params: + action: start + labelSelector: size = ilblarge + - Identifier: ServiceCreationLatencyMedium + Method: ServiceCreationLatency + Params: + action: start + labelSelector: size = ilbmedium + - Identifier: ServiceCreationLatencySmall + Method: ServiceCreationLatency + Params: + action: start + labelSelector: size = ilbsmall + - Identifier: WaitForRunningDeployments + Method: WaitForControlledPodsRunning + Params: + action: start + apiVersion: apps/v1 + kind: Deployment + labelSelector: group = ilbload + operationTimeout: 15m +- name: Creating ILBs + phases: + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 1 + tuningSet: ILBConstantQPS + objectBundle: + - basename: large-backends-dep + objectTemplatePath: dep.yaml + templateFillMap: + NumReplicas: {{$LARGE_BACKEND_SIZE}} + - basename: large-backends-service + objectTemplatePath: service.yaml + templateFillMap: + DeploymentBaseName: large-backends-dep + ILBSizeLabel: {{$LARGE_BACKEND_LABEL}} + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 1 + tuningSet: ILBConstantQPS + objectBundle: + - basename: medium-backends-dep + objectTemplatePath: dep.yaml + templateFillMap: + NumReplicas: {{$MEDIUM_BACKEND_SIZE}} + - basename: medium-backends-service + objectTemplatePath: service.yaml + templateFillMap: + DeploymentBaseName: medium-backends-dep + ILBSizeLabel: {{$MEDIUM_BACKEND_LABEL}} + - namespaceRange: + min: 1 + max: {{$namespaces}} + replicasPerNamespace: 1 + tuningSet: ILBConstantQPS + objectBundle: + - basename: small-backends-dep + objectTemplatePath: dep.yaml + templateFillMap: + NumReplicas: {{$SMALL_BACKEND_SIZE}} + - basename: small-backends-service + objectTemplatePath: service.yaml + templateFillMap: + DeploymentBaseName: small-backends-dep + ILBSizeLabel: {{$SMALL_BACKEND_LABEL}} +- measurements: + - Identifier: ServiceCreationLatencyLarge + Method: ServiceCreationLatency + Params: + action: waitForReady + - Identifier: ServiceCreationLatencyMedium + Method: ServiceCreationLatency + Params: + action: waitForReady + - Identifier: ServiceCreationLatencySmall + Method: ServiceCreationLatency + Params: + action: waitForReady + - Identifier: WaitForRunningDeployments + Method: WaitForControlledPodsRunning + Params: + action: gather +# Delete ILBs +- name: Deleting 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 +- measurements: + - Identifier: ServiceCreationLatencyLarge + Method: ServiceCreationLatency + Params: + action: gather + - Identifier: ServiceCreationLatencyMedium + Method: ServiceCreationLatency + Params: + action: gather + - Identifier: ServiceCreationLatencySmall + 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..469c55a42b --- /dev/null +++ b/clusterloader2/testing/l4ilb/dep.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{.Name}} + labels: + group: ilbload +spec: + replicas: {{.NumReplicas}} + selector: + matchLabels: + name: {{.Name}} + template: + metadata: + labels: + group: ilbload + 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..a9e63f21f1 --- /dev/null +++ b/clusterloader2/testing/l4ilb/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{.Name}} + labels: + size: {{.ILBSizeLabel}} + annotations: + cloud.google.com/load-balancer-type: "Internal" +spec: + type: LoadBalancer + selector: + name: {{.DeploymentBaseName}}-{{.Index}} + ports: + - port: 8080 + targetPort: 80