From b4e751a822539151793ee902eaf0d5bca24526c3 Mon Sep 17 00:00:00 2001 From: Mauro Ezequiel Moltrasio Date: Mon, 4 Sep 2023 17:01:04 +0200 Subject: [PATCH 1/2] Allow running berserker on k8s with configuration capabilities --- k8s/berserker.yml | 39 +++++++++++++++++++++++++++++++++++++ k8s/endpoints-uniform.yml | 13 +++++++++++++ k8s/endpoints-zipf.yml | 14 +++++++++++++ k8s/processes-configmap.yml | 13 +++++++++++++ k8s/syscalls.yml | 11 +++++++++++ 5 files changed, 90 insertions(+) create mode 100644 k8s/berserker.yml create mode 100644 k8s/endpoints-uniform.yml create mode 100644 k8s/endpoints-zipf.yml create mode 100644 k8s/processes-configmap.yml create mode 100644 k8s/syscalls.yml diff --git a/k8s/berserker.yml b/k8s/berserker.yml new file mode 100644 index 0000000..f060eab --- /dev/null +++ b/k8s/berserker.yml @@ -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 diff --git a/k8s/endpoints-uniform.yml b/k8s/endpoints-uniform.yml new file mode 100644 index 0000000..699ec4b --- /dev/null +++ b/k8s/endpoints-uniform.yml @@ -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 diff --git a/k8s/endpoints-zipf.yml b/k8s/endpoints-zipf.yml new file mode 100644 index 0000000..328c3b6 --- /dev/null +++ b/k8s/endpoints-zipf.yml @@ -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 diff --git a/k8s/processes-configmap.yml b/k8s/processes-configmap.yml new file mode 100644 index 0000000..0060641 --- /dev/null +++ b/k8s/processes-configmap.yml @@ -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 diff --git a/k8s/syscalls.yml b/k8s/syscalls.yml new file mode 100644 index 0000000..c9e4ea7 --- /dev/null +++ b/k8s/syscalls.yml @@ -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 From 3e024b3a10407a1ba94e5a505a2755c0adbfcb40 Mon Sep 17 00:00:00 2001 From: Mauro Ezequiel Moltrasio Date: Mon, 19 Feb 2024 17:47:49 +0100 Subject: [PATCH 2/2] Updating to the latest image --- k8s/berserker.yml | 2 +- k8s/endpoints-zipf.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/k8s/berserker.yml b/k8s/berserker.yml index f060eab..8d71048 100644 --- a/k8s/berserker.yml +++ b/k8s/berserker.yml @@ -25,7 +25,7 @@ spec: effect: NoSchedule containers: - name: berserker - image: quay.io/rhacs-eng/qa:berserker-1.0-35-g3d1715a7f3 + image: quay.io/rhacs-eng/qa:berserker-1.0-45-g74de174922 volumeMounts: - name: config mountPath: "/etc/berserker" diff --git a/k8s/endpoints-zipf.yml b/k8s/endpoints-zipf.yml index 328c3b6..8aa6ce3 100644 --- a/k8s/endpoints-zipf.yml +++ b/k8s/endpoints-zipf.yml @@ -1,4 +1,3 @@ - apiVersion: v1 kind: ConfigMap metadata: