Skip to content

Commit

Permalink
Allow running berserker on k8s with configuration capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Molter73 committed Feb 19, 2024
1 parent 74de174 commit b4e751a
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
39 changes: 39 additions & 0 deletions k8s/berserker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: berserker
labels:
app: berserker
spec:
selector:
matchLabels:
name: berserker
template:
metadata:
labels:
name: berserker
spec:
tolerations:
# these tolerations are to have the daemonset runnable on control plane nodes
# remove them if your control plane nodes should not run pods
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
containers:
- name: berserker
image: quay.io/rhacs-eng/qa:berserker-1.0-35-g3d1715a7f3
volumeMounts:
- name: config
mountPath: "/etc/berserker"
readOnly: true
volumes:
- name: config
configMap:
name: berserker-config
items:
- key: workload.toml
path: workload.toml
13 changes: 13 additions & 0 deletions k8s/endpoints-uniform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: berserker-config
data:
workload.toml: |
restart_interval = 10
[workload]
type = "endpoints"
distribution = "uniform"
upper = 100
lower = 1
14 changes: 14 additions & 0 deletions k8s/endpoints-zipf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

apiVersion: v1
kind: ConfigMap
metadata:
name: berserker-config
data:
workload.toml: |
restart_interval = 10
[workload]
type = "endpoints"
distribution = "zipf"
n_ports = 200
exponent = 1.4
13 changes: 13 additions & 0 deletions k8s/processes-configmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: berserker-config
data:
workload.toml: |
restart_interval = 10
[workload]
type = "processes"
arrival_rate = 10.0
departure_rate = 20.0
random_process = true
11 changes: 11 additions & 0 deletions k8s/syscalls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: berserker-config
data:
workload.toml: |
restart_interval = 10
[workload]
type = "syscalls"
arrival_rate = 10.0

0 comments on commit b4e751a

Please sign in to comment.