Skip to content

Commit cf8d013

Browse files
committed
Add support for redis protocol
Signed-off-by: Brenno Oliveira <brenno.oliveira@deliveryhero.com>
1 parent fe05729 commit cf8d013

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ icon: https://ctfd.io/static/img/ctfd.svg
66
type: application
77

88
# Dev note: trigger a helm chart release by bumping the version
9-
version: 0.3.0
9+
version: 0.3.1
1010

1111
# Redis, MySQL/MariaDB and Seaweedfs
1212
dependencies:

templates/_helpers.tpl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,14 @@ mysql+pymysql://{{ index .Values "mariadb-galera" "external" "username" }}:{{ in
7373
{{- end -}}
7474

7575

76-
7776
{{/*
7877
Generate CTFd REDIS_URL (internal bitnami redis or external self managed redis)
7978
*/}}
8079
{{- define "ctfd.REDIS_URL" -}}
8180
{{- if .Values.redis.enabled -}}
8281
redis://{{ .Release.Name }}-redis-master:6379
8382
{{- else -}}
84-
redis://{{ .Values.redis.external.username }}:{{ .Values.redis.external.password }}@{{ .Values.redis.external.host }}:{{ .Values.redis.external.port }}
83+
{{- printf "%s://%s:%s@%s:%v/%s" (.Values.redis.external.protocol | default "redis") .Values.redis.external.username .Values.redis.external.password .Values.redis.external.host .Values.redis.external.port (.Values.redis.external.database | default 0) -}}
8584
{{- end -}}
8685
{{- end -}}
8786

@@ -93,4 +92,4 @@ redis://{{ .Values.redis.external.username }}:{{ .Values.redis.external.password
9392
http://{{ (index .Values.minio.ingress.hosts 0) }}
9493
{{- else -}}
9594
{{- end -}}
96-
{{- end -}}
95+
{{- end -}}

values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,4 +287,4 @@ minio:
287287
size: 10Gi
288288

289289
# -- Made for deploying custom manifests with this helm chart
290-
extraObjects: []
290+
extraObjects: []

0 commit comments

Comments
 (0)