Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions modules/python/clusterloader2/network-scale/config/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: scale-test

# generic config
{{$groupName := DefaultParam .CL2_GROUP_NAME "scale-test"}}
{{$apiServerCallsPerSecond := DefaultParam .CL2_API_SERVER_CALLS_PER_SECOND 5}}

# topology config
{{$namespaces := DefaultParam .CL2_NAMESPACES 1}}
{{$deploymentsPerNamespace := DefaultParam .CL2_DEPLOYMENTS_PER_NAMESPACE 10}}
{{$replicasPerNamespace := DefaultParam .CL2_REPLICAS_PER_NAMESPACE 5}}

# topology config
{{$fortioServerReplicas := DefaultParam .CL2_FORTIO_SERVERS_PER_DEPLOYMENT 10}}
{{$fortioClientReplicas := DefaultParam .CL2_FORTIO_CLIENTS_PER_DEPLOYMENT 10}}
{{$fortioClientQueriesPerSecond := DefaultParam .CL2_FORTIO_CLIENT_QUERIES_PER_SECOND 1000}}
{{$fortioClientConnections := DefaultParam .CL2_FORTIO_CLIENT_CONNECTIONS 10}}
{{$fortioNamespaces := DefaultParam .CL2_FORTIO_NAMESPACES 1}}
{{$fortioDeploymentsPerNamespace := DefaultParam .CL2_FORTIO_DEPLOYMENTS_PER_NAMESPACE 1}}

# Container Network Log config
{{$createContainerNetworkLogs := DefaultParam .CL2_GENERATE_CONTAINER_NETWORK_LOGS false}}


namespace:
number: {{$namespaces}}
prefix: scale-test
deleteStaleNamespaces: true
deleteAutomanagedNamespaces: true
enableExistingNamespaces: false
deleteNamespaceTimeout: 20m

tuningSets:
- name: Sequence
parallelismLimitedLoad:
parallelismLimit: 1
- name: DeploymentCreateQps
qpsLoad:
qps: {{$apiServerCallsPerSecond}}

steps:
- name: Log
measurements:
- Identifier: Dummy
Method: Sleep
Params:
action: start
duration: 1ms

- module:
path: /modules/node-exporter.yaml
params:
actionName: "create"
tuningSet: DeploymentCreateQps

- module:
path: /modules/ama-logs.yaml
params:
actionName: "create"
tuningSet: DeploymentCreateQps

- module:
path: /modules/hubble.yaml
params:
actionName: "create"
tuningSet: DeploymentCreateQps

- module:
path: /modules/scale-test.yaml
params:
action: start
group: {{$groupName}}
createContainerNetworkLogs: {{$createContainerNetworkLogs}}

- module:
path: /modules/hubble.yaml
params:
actionName: "delete"
tuningSet: DeploymentCreateQps

- module:
path: /modules/ama-logs.yaml
params:
actionName: "delete"
tuningSet: DeploymentCreateQps

# TODO: Remove this module once there's a way to deploy node exporter that works in perf-tests repository
- module:
path: /modules/node-exporter.yaml
params:
actionName: "delete"
tuningSet: DeploymentCreateQps
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## AMA Logs module creates AMA Logs pod monitor

# Tuning set
{{$tuningSet := DefaultParam .tuningSet "DeploymentCreateQps"}}

# interval
{{$interval := DefaultParam .interval "15s"}}
{{ $replicasPerNamespace := 1 }}

{{if eq .actionName "create"}}
{{ $replicasPerNamespace = 1 }}
{{else}}
{{ $replicasPerNamespace = 0 }}
{{end}}

steps:
- name: {{.actionName}} AMA Logs Pod Monitor
phases:
- namespaceList:
- "monitoring"
replicasPerNamespace: {{$replicasPerNamespace}}
tuningSet: {{$tuningSet}}
objectBundle:
- objectTemplatePath: "modules/ama-logs/podmonitor.yaml"
basename: ama-logs-metrics
interval: 15s
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: ama-logs-metrics
namespace: monitoring
spec:
jobLabel: ama-logs-metrics
selector:
matchLabels:
component: ama-logs-agent
namespaceSelector:
matchNames:
- kube-system
podMetricsEndpoints:
- interval: 30s
honorLabels: true
path: /metrics
relabelings:
- sourceLabels: [__address__]
action: replace
targetLabel: __address__
regex: (.+?)(\:\d+)?
replacement: $1:9102
- sourceLabels: [__meta_kubernetes_pod_container_name]
regex: "ama-logs"
action: keep
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{{$CpuRequest := DefaultParam .CpuRequest "5m"}}
{{$MemoryRequest := DefaultParam .MemoryRequest "20Mi"}}
{{$Image := DefaultParam .Image "acnpublic.azurecr.io/fortio"}}
{{$FortioClientQueriesPerSecond := .FortioClientQueriesPerSecond}}
{{$FortioClientConnections := .FortioClientConnections}}
{{$uniqueLabel := DefaultParam .uniqueLabel ""}}

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{.Name}}
labels:
group: {{.Group}}
app: fortio
role: load
spec:
replicas: {{.Replicas}}
selector:
matchLabels:
name: {{.Name}}
app: fortio
role: load
strategy:
type: Recreate
template:
metadata:
annotations:
retina.sh: observe
labels:
name: {{.Name}}
group: {{.Group}}
app: fortio
role: load
restart: {{.deploymentLabel}}
{{if ne $uniqueLabel ""}}
uniqueLabelPerDeployment: "{{$uniqueLabel}}{{.Index}}"
{{end}}
spec:
nodeSelector:
scale-test: "true"
containers:
- name: fortio
image: {{$Image}}
imagePullPolicy: IfNotPresent
args:
[
"load",
"-nocatchup",
"-uniform",
"-sequential-warmup",
"-jitter",
"-udp-timeout",
"1500ms",
"-timeout",
"60s",
"-connection-reuse",
"{{$FortioClientConnections}}:{{$FortioClientConnections}}",
"-c",
"{{$FortioClientConnections}}",
"-qps",
"{{$FortioClientQueriesPerSecond}}",
"-t",
"0",
"http://{{.FortioServerServiceBasename}}-{{.Index}}:8080"
]
ports:
- containerPort: 8078 # tcp echo
- containerPort: 8079 # grpc echo
- containerPort: 8080 # main serving port
- containerPort: 8081 # redirection to https port
resources:
requests:
cpu: {{$CpuRequest}}
memory: {{$MemoryRequest}}
# Add not-ready/unreachable tolerations for 15 minutes so that node
# failure doesn't trigger pod deletion.
tolerations:
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
- key: "scale-test"
operator: "Equal"
value: "true"
effect: "NoSchedule"
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{{$CpuRequest := DefaultParam .CpuRequest "5m"}}
{{$MemoryRequest := DefaultParam .MemoryRequest "20Mi"}}
{{$Image := DefaultParam .Image "acnpublic.azurecr.io/fortio"}}

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{.Name}}
labels:
group: {{.Group}}
app: fortio
role: server
svc: {{.Name}}
spec:
replicas: {{.Replicas}}
selector:
matchLabels:
name: {{.Name}}
app: fortio
role: server
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 20%
maxSurge: 20%
template:
metadata:
annotations:
retina.sh: observe
labels:
name: {{.Name}}
group: {{.Group}}
app: fortio
role: server
svc: {{.Name}}
restart: {{.deploymentLabel}}
spec:
nodeSelector:
scale-test: "true"
containers:
- name: fortio
image: {{$Image}}
imagePullPolicy: IfNotPresent
args: ["server", "-http-port", "0.0.0.0:8080"]
ports:
- containerPort: 8078 # tcp echo
- containerPort: 8079 # grpc echo
- containerPort: 8080 # main serving port
- containerPort: 8081 # redirection to https port
resources:
requests:
cpu: {{$CpuRequest}}
memory: {{$MemoryRequest}}
# Add not-ready/unreachable tolerations for 15 minutes so that node
# failure doesn't trigger pod deletion.
tolerations:
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 900
- key: "scale-test"
operator: "Equal"
value: "true"
effect: "NoSchedule"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: {{.Name}}
spec:
selector:
svc: {{.Name}}
ports:
- port: 8080
targetPort: 8080
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Hubble module creates Hubble pod monitor

# Tuning set
{{$tuningSet := DefaultParam .tuningSet "DeploymentCreateQps"}}

# interval
{{$interval := DefaultParam .interval "15s"}}
{{ $replicasPerNamespace := 1 }}

{{if eq .actionName "create"}}
{{ $replicasPerNamespace = 1 }}
{{else}}
{{ $replicasPerNamespace = 0 }}
{{end}}

steps:
- name: {{.actionName}} Hubble Pod Monitor
phases:
- namespaceList:
- "monitoring"
replicasPerNamespace: {{$replicasPerNamespace}}
tuningSet: {{$tuningSet}}
objectBundle:
- objectTemplatePath: "modules/hubble/podmonitor.yaml"
basename: hubble-metrics
interval: 15s
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: hubble-metrics
namespace: monitoring
spec:
# Hubble metrics are exposed by cilium-agent pods on port 9965.
# This PodMonitor scrapes Hubble metrics from cilium-agent.
selector:
matchLabels:
k8s-app: cilium
namespaceSelector:
matchNames:
- kube-system
podMetricsEndpoints:
- interval: 30s
honorLabels: true
path: /metrics
relabelings:
- sourceLabels: [__address__]
action: replace
targetLabel: __address__
regex: (.+?)(\:\d+)?
replacement: $1:9965
Loading