Skip to content

Commit 8804580

Browse files
committed
pass username
1 parent 68ab2b4 commit 8804580

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

helm/databunkerpro/templates/configmap-env.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ data:
3636
{{- end }}
3737
{{- if .Values.redis.enabled }}
3838
{{- if .Values.redis.external }}
39+
REDIS_USER_NAME: {{ .Values.redis.externalConfig.username | quote }}
3940
REDIS_HOST: {{ .Values.redis.externalConfig.host | quote }}
4041
REDIS_PORT: {{ .Values.redis.externalConfig.port | quote }}
4142
{{- else }}
43+
REDIS_USER_NAME: {{ .Values.redis.internal.auth.username | quote }}
4244
REDIS_HOST: "{{ include "databunkerpro.fullname" . }}-redis"
4345
REDIS_PORT: "6379"
4446
{{- end }}

helm/databunkerpro/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
value: "/var/run/secrets/kubernetes.io/serviceaccount/mysql-password/password"
5656
{{- end }}
5757
{{- if .Values.redis.enabled }}
58-
- name: REDIS_PASS_FILE
58+
- name: REDIS_USER_PASS_FILE
5959
value: "/var/run/secrets/kubernetes.io/serviceaccount/redis-password/password"
6060
{{- end }}
6161
ports:

helm/databunkerpro/templates/redis.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ spec:
2525
- name: redis
2626
containerPort: 6379
2727
protocol: TCP
28-
command:
29-
- redis-server
30-
- --requirepass
31-
- $(REDIS_PASSWORD)
28+
command: /bin/sh -c "redis-server --requirepass $$REDIS_USER_PASS"
3229
env:
33-
- name: REDIS_PASSWORD
30+
- name: REDIS_USER_PASS
3431
valueFrom:
3532
secretKeyRef:
3633
name: {{ include "databunkerpro.fullname" . }}-redis

helm/databunkerpro/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ redis:
189189
port: 6379
190190
# make sure to set password
191191
password: ""
192+
username: "default"
192193

193194
# Internal Redis configuration (used when external: false)
194195
internal:
@@ -207,6 +208,7 @@ redis:
207208
cpu: "200m"
208209
auth:
209210
password: "" # Will be auto-generated if not set
211+
username: "default"
210212

211213
# DatabunkerPro configuration
212214
config:

0 commit comments

Comments
 (0)