Skip to content

Commit

Permalink
Cluster-density managed-services edition (kube-burner#285)
Browse files Browse the repository at this point in the history
* Cluster-density managed-services edition

Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 authored Apr 5, 2023
1 parent 0ef2273 commit ce4b4eb
Show file tree
Hide file tree
Showing 11 changed files with 206 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
global:
gc: {{.GC}}
indexerConfig:
enabled: {{.INDEXING}}
esServers: ["{{.ES_SERVER}}"]
insecureSkipVerify: true
defaultIndex: {{.ES_INDEX}}
type: {{.INDEXING_TYPE}}
measurements:
- name: podLatency
jobs:
- name: cluster-density-ms
namespace: cluster-density-ms
jobIterations: {{.JOB_ITERATIONS}}
qps: {{.QPS}}
burst: {{.BURST}}
namespacedIterations: true
podWait: false
waitWhenFinished: true
preLoadImages: true
preLoadPeriod: 30s
churn: {{.CHURN}}
churnDuration: {{.CHURN_DURATION}}
churnPercent: {{.CHURN_PERCENT}}
churnDelay: {{.CHURN_DELAY}}
namespaceLabels:
security.openshift.io/scc.podSecurityLabelSync: false
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/audit: privileged
pod-security.kubernetes.io/warn: privileged
objects:

- objectTemplate: imagestream.yml
replicas: 1

- objectTemplate: deployment.yml
replicas: 4
inputVars:
podReplicas: 2

- objectTemplate: service.yml
replicas: 2

- objectTemplate: route.yml
replicas: 1

- objectTemplate: secret.yml
replicas: 20

- objectTemplate: configmap.yml
replicas: 10
7 changes: 7 additions & 0 deletions cmd/kube-burner/ocp-config/cluster-density-ms/configmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{.JobName}}-{{.Replica}}
data:
key1: "{{rand 2048}}"
101 changes: 101 additions & 0 deletions cmd/kube-burner/ocp-config/cluster-density-ms/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: cluster-density-{{.Replica}}
spec:
replicas: {{.podReplicas}}
selector:
matchLabels:
app: cluster-density-{{.Replica}}
template:
metadata:
labels:
app: cluster-density-{{.Replica}}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/worker
operator: Exists
- key: node-role.kubernetes.io/infra
operator: DoesNotExist
- key: node-role.kubernetes.io/workload
operator: DoesNotExist
containers:
- args:
- sleep
- infinity
image: registry.k8s.io/pause:3.1
resources:
requests:
memory: "10Mi"
cpu: "10m"
volumeMounts:
- name: secret-1
mountPath: /secret1
- name: secret-2
mountPath: /secret2
- name: secret-3
mountPath: /secret3
- name: secret-4
mountPath: /secret4
- name: configmap-1
mountPath: /configmap1
- name: configmap-2
mountPath: /configmap2
- name: configmap-3
mountPath: /configmap3
- name: configmap-4
mountPath: /configmap4
- name: podinfo
mountPath: /etc/podlabels
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
name: cluster-density
env:
- name: ENVVAR1
value: "{{rand 250}}"
- name: ENVVAR2
value: "{{rand 250}}"
- name: ENVVAR3
value: "{{rand 250}}"
- name: ENVVAR4
value: "{{rand 250}}"
volumes:
- name: secret-1
secret:
secretName: {{.JobName}}-1
- name: secret-2
secret:
secretName: {{.JobName}}-2
- name: secret-3
secret:
secretName: {{.JobName}}-3
- name: secret-4
secret:
secretName: {{.JobName}}-4
- name: configmap-1
configMap:
name: {{.JobName}}-1
- name: configmap-2
configMap:
name: {{.JobName}}-2
- name: configmap-3
configMap:
name: {{.JobName}}-3
- name: configmap-4
configMap:
name: {{.JobName}}-4
- name: podinfo
downwardAPI:
items:
- path: "labels"
fieldRef:
fieldPath: metadata.labels
5 changes: 5 additions & 0 deletions cmd/kube-burner/ocp-config/cluster-density-ms/imagestream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
name: cluster-density-{{.Replica}}
11 changes: 11 additions & 0 deletions cmd/kube-burner/ocp-config/cluster-density-ms/route.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: cluster-density-{{.Replica}}
spec:
to:
kind: Service
name: cluster-density-{{.Replica}}
tls:
termination: edge
7 changes: 7 additions & 0 deletions cmd/kube-burner/ocp-config/cluster-density-ms/secret.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Secret
metadata:
name: {{.JobName}}-{{.Replica}}
data:
top-secret: "{{rand 2048}}"
18 changes: 18 additions & 0 deletions cmd/kube-burner/ocp-config/cluster-density-ms/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
kind: Service
apiVersion: v1
metadata:
name: cluster-density-{{.Replica}}
spec:
selector:
app: cluster-density-{{.Replica}}
ports:
- name: http
protocol: TCP
port: 80
targetPort: 8080
- name: https
protocol: TCP
port: 443
targetPort: 8443
type: ClusterIP
1 change: 1 addition & 0 deletions cmd/kube-burner/ocp.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func openShiftCmd() *cobra.Command {
ocpCmd.AddCommand(
workloads.NewClusterDensity(&wh, "cluster-density"),
workloads.NewClusterDensity(&wh, "cluster-density-v2"),
workloads.NewClusterDensity(&wh, "cluster-density-ms"),
workloads.NewNodeDensity(&wh),
workloads.NewNodeDensityHeavy(&wh),
workloads.NewNodeDensityCNI(&wh),
Expand Down
1 change: 1 addition & 0 deletions docs/ocp.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Usage:
Available Commands:
cluster-density Runs cluster-density workload
cluster-density-v2 Runs cluster-density-v2 workload
cluster-density-ms Runs cluster-density-ms workload
node-density Runs node-density workload
node-density-cni Runs node-density-cni workload
node-density-heavy Runs node-density-heavy workload
Expand Down
1 change: 1 addition & 0 deletions pkg/workloads/workloads.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package workloads

var MetricsProfileMap = map[string]string{
"cluster-density-ms": "metrics-aggregated.yml",
"cluster-density-v2": "metrics-aggregated.yml",
"cluster-density": "metrics-aggregated.yml",
"node-density": "metrics.yml",
Expand Down
4 changes: 2 additions & 2 deletions test/run-ocp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ echo "Running cluster-density wrapper and user metadata"
kube-burner ocp cluster-density --iterations=2 --churn-duration=2m ${COMMON_FLAGS} --user-metadata=user-metadata.yml
echo "Running cluster-density wrapper"
kube-burner ocp cluster-density --iterations=2 --churn=false --uuid=${UUID}
echo "Running cluster-density wrapper for multiple endpoints case"
kube-burner ocp cluster-density --iterations=1 --churn-duration=2m --metrics-endpoint metrics-endpoints.yaml ${COMMON_FLAGS}
echo "Running cluster-density-ms wrapper for multiple endpoints case"
kube-burner ocp cluster-density-ms --iterations=1 --churn-duration=2m --metrics-endpoint metrics-endpoints.yaml ${COMMON_FLAGS}
echo "Running cluster-density-v2 wrapper"
kube-burner ocp cluster-density-v2 --iterations=2 --churn-duration=2m ${COMMON_FLAGS}
# Disable gc and avoid metric indexing
Expand Down

0 comments on commit ce4b4eb

Please sign in to comment.