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/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 51d58ae..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 -}} -redis://{{ .Values.redis.external.username }}:{{ .Values.redis.external.password }}@{{ .Values.redis.external.host }}:{{ .Values.redis.external.port }} +{{- 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 -}} @@ -93,4 +93,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..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: []