From ddcc0ce14e39cf045f500986fa5c53d336f17775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anatol=20Karalko=C5=AD?= Date: Mon, 1 Apr 2024 12:02:54 +0200 Subject: [PATCH] Add repeater to pod --- charts/brokencrystals/Chart.yaml | 2 +- .../brokencrystals/templates/deployment.yaml | 25 +++++++++++++++++++ charts/brokencrystals/values.yaml | 5 ++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/charts/brokencrystals/Chart.yaml b/charts/brokencrystals/Chart.yaml index b6431968..7c378036 100644 --- a/charts/brokencrystals/Chart.yaml +++ b/charts/brokencrystals/Chart.yaml @@ -4,7 +4,7 @@ description: | Benchmark application that uses modern technologies and implements a set of common security vulnerabilities type: application -version: 0.0.65 +version: 0.0.66 keywords: - brokencrystals - brkn diff --git a/charts/brokencrystals/templates/deployment.yaml b/charts/brokencrystals/templates/deployment.yaml index 1ec0e0a9..608951f0 100644 --- a/charts/brokencrystals/templates/deployment.yaml +++ b/charts/brokencrystals/templates/deployment.yaml @@ -25,6 +25,7 @@ spec: - "keycloak" - "nodejs" - "proxy" + - "repeater" containers: - name: postgres image: postgres @@ -222,6 +223,30 @@ spec: scheme: HTTP initialDelaySeconds: 120 periodSeconds: 30 + + {{- if and .Values.repeaterID .Values.token .Values.cluster }} + - name: repeater + image: brightsec/cli{{ if ne .Values.repeaterImageTag "" }}:{{ .Values.repeaterImageTag }}{{ else }}:latest{{ end }} + command: ["bright-cli", "repeater"] + args: + - "--token=$(TOKEN)" + - "--id=$(REPEATER_ID)" + - "--cluster=$(CLUSTER)" + - "--timeout=$(TIMEOUT)" + resources: + requests: + cpu: 200m + memory: 100Mi + env: + - name: REPEATER_ID + value: "{{ .Values.repeaterID }}" + - name: TOKEN + value: "{{ .Values.token }}" + - name: CLUSTER + value: "{{ .Values.cluster }}" + - name: TIMEOUT + value: "{{ .Values.timeout | default "30000" }}" + {{- end }} restartPolicy: Always volumes: diff --git a/charts/brokencrystals/values.yaml b/charts/brokencrystals/values.yaml index b5ccbb8f..f38238c3 100644 --- a/charts/brokencrystals/values.yaml +++ b/charts/brokencrystals/values.yaml @@ -5,3 +5,8 @@ ingress: images: main: stable client: stable +repeaterImageTag: "" +repeaterID: "" +token: "" +cluster: "" +timeout: ""