File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
charts/webhooks-receiver/templates Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change 1+ {{- $repeaterIDs := (or (and (hasKey .Values "global") (hasKey .Values.global "repeaterIDs") .Values.global.repeaterIDs) (list .Values.repeaterID)) }}
2+ {{- $token := (or (and (hasKey .Values "global") (hasKey .Values.global "token") .Values.global.token) .Values.token) }}
3+ {{- $cluster := (or (hasKey .Values "global") (hasKey .Values.global "cluster") .Values.global.cluster) .Values.cluster) }}
4+ {{- $timeout := (or (hasKey .Values "global") (hasKey .Values.global "timeout") .Values.global.timeout) .Values.timeout "30000") }}
5+ {{- $repeaterImageTag := (or (hasKey .Values "global") (hasKey .Values.global "repeaterImageTag") .Values.global.repeaterImageTag) .Values.repeaterImageTag "latest") }}
6+
7+ ---
18apiVersion : apps/v1
29kind : Deployment
310metadata :
3643 port : 8080
3744 scheme : HTTP
3845
39- {{- if and .Values.repeaterID .Values.token .Values.cluster }}
40- - name : repeater
41- image : brightsec/cli{{ if .Values.repeaterImageTag }}:{{ .Values.repeaterImageTag }}{{ else }}:latest{{ end }}
46+ {{- if and $token $cluster }}
47+ {{- range $index, $repeaterID := $repeaterIDs }}
48+ - name : repeater-{{ $index }}
49+ image : brightsec/cli:{{ $repeaterImageTag }}
4250 command : ["bright-cli", "repeater"]
4351 args :
4452 - " --token=$(TOKEN)"
@@ -52,11 +60,12 @@ spec:
5260 memory : 100Mi
5361 env :
5462 - name : REPEATER_ID
55- value : " {{ .Values. repeaterID }}"
63+ value : " {{ $ repeaterID }}"
5664 - name : TOKEN
57- value : " {{ .Values. token }}"
65+ value : " {{ $ token }}"
5866 - name : CLUSTER
59- value : " {{ .Values. cluster }}"
67+ value : " {{ $ cluster }}"
6068 - name : TIMEOUT
61- value : " {{ .Values.timeout | default " 30000" }}"
69+ value : " {{ $timeout }}"
70+ {{- end }}
6271 {{- end }}
You can’t perform that action at this time.
0 commit comments