Skip to content

Commit 714c4f2

Browse files
authored
fest(nextcloud): support external redis #767
feat: support external redis
2 parents 78c3c7f + 9e818fe commit 714c4f2

File tree

4 files changed

+46
-1
lines changed

4 files changed

+46
-1
lines changed

charts/nextcloud/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: nextcloud
3-
version: 7.0.3
3+
version: 7.0.4
44
# renovate: image=docker.io/library/nextcloud
55
appVersion: 31.0.8
66
description: A file sharing server that puts the control and security of your own data back into your hands.

charts/nextcloud/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ The following table lists the configurable parameters of the nextcloud chart and
196196
| `redis.global.storageClass` | PVC Storage Class for both Redis® master and replica Persistent Volumes | `''` |
197197
| `redis.master.persistence.enabled` | Enable persistence on Redis® master nodes using Persistent Volume Claims | `true` |
198198
| `redis.replica.persistence.enabled` | Enable persistence on Redis® replica nodes using Persistent Volume Claims | `true` |
199+
| `externalRedis.enabled` | Whether to use external Redis | `false` |
200+
| `externalRedis.host` | Redis host | `""` |
201+
| `externalRedis.port` | Redis port | `"6379"` |
202+
| `externalRedis.password` | Redis password | `""` |
203+
| `externalRedis.existingSecret.enabled` | Whether to use a existing secret or not | `false` |
204+
| `externalDatabase.existingSecret.secretName` | Name of the existing secret | `nil` |
205+
| `externalDatabase.existingSecret.passwordKey` | Name of the key that contains the Redis password | `redis-password` |
199206
| `cronjob.command` | The command the cronjob container executes | `/cron.sh` |
200207
| `cronjob.enabled` | Whether to enable/disable cron jobs sidecar | `false` |
201208
| `cronjob.lifecycle.postStartCommand` | Specify deployment lifecycle hook postStartCommand for the cron jobs sidecar | `nil` |

charts/nextcloud/templates/_helpers.tpl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,23 @@ Redis env vars
236236
value: {{ .Values.redis.auth.password }}
237237
{{- end }}
238238
{{- end }}
239+
{{- else if .Values.externalRedis.enabled }}
240+
- name: REDIS_HOST
241+
value: {{ .Values.externalRedis.host | quote }}
242+
- name: REDIS_HOST_PORT
243+
value: {{ .Values.externalRedis.port | quote }}
244+
{{- if .Values.externalRedis.existingSecret.enabled }}
245+
{{- if and .Values.externalRedis.existingSecret.secretName .Values.externalRedis.existingSecret.passwordKey }}
246+
- name: REDIS_HOST_PASSWORD
247+
valueFrom:
248+
secretKeyRef:
249+
name: {{ .Values.externalRedis.existingSecret.secretName | quote }}
250+
key: {{ .Values.externalRedis.existingSecret.passwordKey | quote }}
251+
{{- end }}
252+
{{- else if .Values.externalRedis.password }}
253+
- name: REDIS_HOST_PASSWORD
254+
value: {{ .Values.externalRedis.password | quote }}
255+
{{- end }}
239256
{{- end }}{{/* end if redis.enabled */}}
240257
{{/*
241258
S3 as primary object store env vars

charts/nextcloud/values.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,27 @@ postgresql:
479479
# existingClaim: ""
480480
# storageClass: ""
481481

482+
##
483+
## External Redis configuration
484+
##
485+
externalRedis:
486+
enabled: false
487+
488+
## Redis host
489+
host: ""
490+
491+
## Redis port
492+
port: "6379"
493+
494+
## Redis password
495+
password: ""
496+
497+
## Use a existing secret
498+
existingSecret:
499+
enabled: false
500+
# secretName: nameofsecret
501+
passwordKey: redis-password
502+
482503
##
483504
## Redis chart configuration
484505
## for more options see https://github.com/bitnami/charts/tree/main/bitnami/redis

0 commit comments

Comments
 (0)