Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `''` |
Expand Down
6 changes: 5 additions & 1 deletion charts/nextcloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,18 @@ Redis env vars
value: {{ .Values.externalRedis.password | quote }}
{{- end }}
{{- end }}{{/* end-of redis-enabled*/}}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong position of end

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wrenix I am not seeing an issues with the end. Are you suggesting this should be in the redis.auth.enabled section with the rest of those settings?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

{{- if .Values.redis.auth.user }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{- if .Values.redis.auth.user }}
{{- with .Values.redis.auth.user }}
....
value: {{ quote . }}

- 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)
(and .Values.externalRedis.enabled .Values.externalRedis.existingSecret.secretName .Values.externalRedis.existingSecret.passwordKey)
(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)"
Expand Down
2 changes: 2 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down