Skip to content

Commit

Permalink
Add repeater to pod
Browse files Browse the repository at this point in the history
  • Loading branch information
rielas committed Apr 1, 2024
1 parent c8c3d87 commit ddcc0ce
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
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.0.65
version: 0.0.66
keywords:
- brokencrystals
- brkn
25 changes: 25 additions & 0 deletions charts/brokencrystals/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
- "keycloak"
- "nodejs"
- "proxy"
- "repeater"
containers:
- name: postgres
image: postgres
Expand Down Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions charts/brokencrystals/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ ingress:
images:
main: stable
client: stable
repeaterImageTag: ""
repeaterID: ""
token: ""
cluster: ""
timeout: ""

0 comments on commit ddcc0ce

Please sign in to comment.