Skip to content

Commit

Permalink
Merge branch 'unstable'
Browse files Browse the repository at this point in the history
  • Loading branch information
rielas committed Feb 11, 2025
2 parents 965a841 + 51390be commit 803cb7c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion charts/brokencrystals/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |
Benchmark application that uses modern technologies and implements a set of
common security vulnerabilities
type: application
version: 0.1.0
version: 0.1.5
icon: https://raw.githubusercontent.com/NeuraLegion/brokencrystals/stable/public/public/assets/img/logo.png
keywords:
- brokencrystals
Expand Down
32 changes: 20 additions & 12 deletions charts/brokencrystals/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{{- $repeaterIDs := (or (and (hasKey .Values "global") .Values.global.repeaterIDs) (compact (list .Values.repeaterID))) }}
{{- $token := (or (and (hasKey .Values "global") .Values.global.token) .Values.token) }}
{{- $cluster := (or (and (hasKey .Values "global") .Values.global.cluster) .Values.cluster) }}
{{- $timeout := (or (and (hasKey .Values "global") .Values.global.timeout) .Values.timeout "30000") }}
{{- $repeaterImageTag := (or (and (hasKey .Values "global") .Values.global.repeaterImageTag) .Values.repeaterImageTag "latest") }}

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -194,29 +200,31 @@ spec:
image: sj26/mailcatcher
{{- end }}

{{- if and .Values.repeaterID .Values.token .Values.cluster }}
- name: repeater
image: brightsec/cli{{ if ne .Values.repeaterImageTag "" }}:{{ .Values.repeaterImageTag }}{{ else }}:latest{{ end }}
{{- if and $token $cluster (gt (len $repeaterIDs) 0) }}
{{- range $index, $repeaterID := $repeaterIDs }}
- name: repeater-{{ $index }}
image: brightsec/cli:{{ $repeaterImageTag }}
command: ["bright-cli", "repeater"]
args:
- "--token=$(TOKEN)"
- "--id=$(REPEATER_ID)"
- "--cluster=$(CLUSTER)"
- "--timeout=$(TIMEOUT)"
- "--log-level=verbose"
- "--token=$(TOKEN)"
- "--id=$(REPEATER_ID)"
- "--cluster=$(CLUSTER)"
- "--timeout=$(TIMEOUT)"
- "--log-level=verbose"
resources:
requests:
cpu: 200m
memory: 100Mi
env:
- name: REPEATER_ID
value: "{{ .Values.repeaterID }}"
value: "{{ $repeaterID }}"
- name: TOKEN
value: "{{ .Values.token }}"
value: "{{ $token }}"
- name: CLUSTER
value: "{{ .Values.cluster }}"
value: "{{ $cluster }}"
- name: TIMEOUT
value: "{{ .Values.timeout | default "30000" }}"
value: "{{ $timeout }}"
{{- end }}
{{- end }}

volumes:
Expand Down
8 changes: 4 additions & 4 deletions charts/brokencrystals/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ ingress:
images:
main: stable-52ed70
repeaterImageTag: ""
repeaterID: ""
token: ""
cluster: ""
timeout: ""
repeaterID: null
token: null
cluster: null
timeout: null
clusterConfigMap: "brokencrystals-config"
useMailcatcher: false

0 comments on commit 803cb7c

Please sign in to comment.