Skip to content

Commit

Permalink
[sqli-lab] Adding repeater to helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Denan Musinovic committed Jun 6, 2024
1 parent 81a4f38 commit d3857b8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/sqli/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,29 @@ spec:
# command: ["sh", "-c", "curl -k -s http://sqli/Less-1/?id=12"]
# initialDelaySeconds: 120
# periodSeconds: 60
{{- 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
3 changes: 3 additions & 0 deletions charts/sqli/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not (and .Values.repeaterID .Values.token .Values.cluster) }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand All @@ -20,6 +21,7 @@ metadata:
cert-manager.io/cluster-issuer: letsencrypt-cf-prod
{{ end }}
spec:
ingressClassName: nginx
tls:
- hosts:
- {{ .Values.ingress.url }}
Expand All @@ -35,3 +37,4 @@ spec:
name: {{ .Release.Name }}
port:
number: 80
{{- end }}
5 changes: 5 additions & 0 deletions charts/sqli/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ ingress:
url: dev.vuln.nexploit.app
cert: ""
authlevel: "."
repeaterImageTag: ""
repeaterID: ""
token: ""
cluster: ""
timeout: ""

0 comments on commit d3857b8

Please sign in to comment.