From 604ba8b327ef57dee033ceb11b2e6750a89210da Mon Sep 17 00:00:00 2001 From: Justin Holmes Date: Wed, 21 Oct 2026 22:12:55 -0400 Subject: [PATCH] Add support for redis user enviroment variable --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/README.md | 1 + charts/nextcloud/templates/_helpers.tpl | 6 +++++- charts/nextcloud/values.yaml | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index ee759ca1..6d5c5bac 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 9.4.0 +version: 9.4.1 # renovate: image=docker.io/library/nextcloud appVersion: 35.0.1 description: A file sharing server that puts the control and security of your own data back into your hands. diff --git a/charts/nextcloud/README.md b/charts/nextcloud/README.md index bd94bb23..74c857fc 100644 --- a/charts/nextcloud/README.md +++ b/charts/nextcloud/README.md @@ -195,6 +195,7 @@ The following table lists the configurable parameters of the nextcloud chart and | `lifecycle.preStopCommand` | Specify deployment lifecycle hook preStopCommand | `nil` | | `redis.enabled` | Whether to install/use redis for locking | `false` | | `redis.auth.enabled` | Whether to enable password authentication with redis | `true` | +| `redis.auth.user` | The user redis uses | `''` | | `redis.auth.password` | The password redis uses | `''` | | `redis.auth.existingSecret` | The name of an existing secret with RedisĀ® credentials | `''` | | `redis.auth.existingSecretPasswordKey` | Password key to be retrieved from existing secret | `''` | diff --git a/charts/nextcloud/templates/_helpers.tpl b/charts/nextcloud/templates/_helpers.tpl index 0b26c019..6ee228f4 100644 --- a/charts/nextcloud/templates/_helpers.tpl +++ b/charts/nextcloud/templates/_helpers.tpl @@ -212,6 +212,10 @@ Redis env vars value: {{ .Values.externalRedis.password | quote }} {{- end }} {{- end }}{{/* end-of redis-enabled*/}} +{{- if .Values.redis.auth.user }} +- name: REDIS_USER + value: {{ .Values.redis.auth.user }} +{{- end }} {{- if or (and .Values.redis.auth.enabled .Values.redis.auth.password) (and .Values.redis.auth.enabled .Values.redis.auth.existingSecret .Values.redis.auth.existingSecretPasswordKey) @@ -219,7 +223,7 @@ Redis env vars (and .Values.externalRedis.enabled .Values.externalRedis.password) }} - name: REDIS_URL - value: "redis://:$(REDIS_HOST_PASSWORD)@$(REDIS_HOST):$(REDIS_HOST_PORT)" + value: "redis://$(REDIS_USER):$(REDIS_HOST_PASSWORD)@$(REDIS_HOST):$(REDIS_HOST_PORT)" {{- else }} - name: REDIS_URL value: "redis://$(REDIS_HOST):$(REDIS_HOST_PORT)" diff --git a/charts/nextcloud/values.yaml b/charts/nextcloud/values.yaml index 860ad7ad..98182f91 100644 --- a/charts/nextcloud/values.yaml +++ b/charts/nextcloud/values.yaml @@ -595,6 +595,8 @@ redis: repository: bitnamilegacy/redis auth: enabled: true + # Username for redis authentication + user: password: "changeme" # name of an existing secret with RedisĀ® credentials (instead of auth.password), must be created ahead of time existingSecret: ""