From cf8d013c97852ffbfa1a842d73b009120273a0b4 Mon Sep 17 00:00:00 2001 From: Brenno Oliveira Date: Tue, 14 Oct 2025 20:36:35 +0200 Subject: [PATCH 1/3] Add support for redis protocol Signed-off-by: Brenno Oliveira --- Chart.yaml | 2 +- templates/_helpers.tpl | 5 ++--- values.yaml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index 96fdc13..5735ed1 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -6,7 +6,7 @@ icon: https://ctfd.io/static/img/ctfd.svg type: application # Dev note: trigger a helm chart release by bumping the version -version: 0.3.0 +version: 0.3.1 # Redis, MySQL/MariaDB and Seaweedfs dependencies: diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 51d58ae..f7aa602 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -73,7 +73,6 @@ mysql+pymysql://{{ index .Values "mariadb-galera" "external" "username" }}:{{ in {{- end -}} - {{/* Generate CTFd REDIS_URL (internal bitnami redis or external self managed redis) */}} @@ -81,7 +80,7 @@ mysql+pymysql://{{ index .Values "mariadb-galera" "external" "username" }}:{{ in {{- if .Values.redis.enabled -}} redis://{{ .Release.Name }}-redis-master:6379 {{- else -}} -redis://{{ .Values.redis.external.username }}:{{ .Values.redis.external.password }}@{{ .Values.redis.external.host }}:{{ .Values.redis.external.port }} +{{- 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) -}} {{- end -}} {{- end -}} @@ -93,4 +92,4 @@ redis://{{ .Values.redis.external.username }}:{{ .Values.redis.external.password http://{{ (index .Values.minio.ingress.hosts 0) }} {{- else -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/values.yaml b/values.yaml index f8ff639..c56f92f 100644 --- a/values.yaml +++ b/values.yaml @@ -287,4 +287,4 @@ minio: size: 10Gi # -- Made for deploying custom manifests with this helm chart -extraObjects: [] \ No newline at end of file +extraObjects: [] From b0b96db7dad9eb1df905acd39779378f2602ec78 Mon Sep 17 00:00:00 2001 From: Brenno Oliveira Date: Tue, 14 Oct 2025 20:42:48 +0200 Subject: [PATCH 2/3] typo Signed-off-by: Brenno Oliveira --- templates/_helpers.tpl | 1 + values.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index f7aa602..d87e493 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -73,6 +73,7 @@ mysql+pymysql://{{ index .Values "mariadb-galera" "external" "username" }}:{{ in {{- end -}} + {{/* Generate CTFd REDIS_URL (internal bitnami redis or external self managed redis) */}} diff --git a/values.yaml b/values.yaml index c56f92f..f8ff639 100644 --- a/values.yaml +++ b/values.yaml @@ -287,4 +287,4 @@ minio: size: 10Gi # -- Made for deploying custom manifests with this helm chart -extraObjects: [] +extraObjects: [] \ No newline at end of file From 7fa4453370a43d2b6b5b23e57d24802ed4a2749e Mon Sep 17 00:00:00 2001 From: Brenno Oliveira Date: Wed, 15 Oct 2025 09:59:26 +0200 Subject: [PATCH 3/3] update values.yaml, run helm-docs Signed-off-by: Brenno Oliveira --- README.md | 2 +- templates/_helpers.tpl | 2 +- values.yaml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 222441d..3775d9e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # CTFd Helm Chart -![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![Lint and Server-side Dryrun Chart](https://github.com/ScribblerCoder/CTFd-Helm/actions/workflows/helm-lint-test.yaml/badge.svg)](https://github.com/ScribblerCoder/CTFd-Helm/actions/workflows/helm-lint-test.yaml) This is a Helm chart for deploying CTFd on Kubernetes. It deploys the official [CTFd Docker image](ghcr.io/ctfd/ctfd). HA and Autoscaling + MariaDB + Redis + S3 Storage. Also supports using external MariaDB/Redis/S3. diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index d87e493..94c0d3e 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -81,7 +81,7 @@ mysql+pymysql://{{ index .Values "mariadb-galera" "external" "username" }}:{{ in {{- if .Values.redis.enabled -}} redis://{{ .Release.Name }}-redis-master:6379 {{- else -}} -{{- 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) -}} +{{- printf "%s://%s:%s@%s:%v/%v" (.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) -}} {{- end -}} {{- end -}} diff --git a/values.yaml b/values.yaml index f8ff639..7774a79 100644 --- a/values.yaml +++ b/values.yaml @@ -235,6 +235,8 @@ redis: host: external-redis-host username: "" password: "" + protocol: "redis" # change to rediss if you are using TLS + database: 0 volumePermissions: enabled: true # set to false if you want to manage the permissions yourself sysctl: @@ -287,4 +289,4 @@ minio: size: 10Gi # -- Made for deploying custom manifests with this helm chart -extraObjects: [] \ No newline at end of file +extraObjects: []