[bitnami/redis] Allow grabbing sentinel acl configuration from userSecret (#33546)

This commit is contained in:
Willy
2025-05-14 08:35:25 +02:00
committed by GitHub
parent b63c8ad0e3
commit 17c2fa34d8
3 changed files with 14 additions and 7 deletions

View File

@@ -1,8 +1,12 @@
# Changelog
## 21.0.4 (2025-05-13)
## 21.1.0 (2025-05-13)
* [bitnami/redis] :zap: :arrow_up: Update dependency references ([#33666](https://github.com/bitnami/charts/pull/33666))
* [bitnami/redis] Allow grabbing sentinel acl configuration from userSecret ([#33546](https://github.com/bitnami/charts/pull/33546))
## <small>21.0.4 (2025-05-13)</small>
* [bitnami/redis] :zap: :arrow_up: Update dependency references (#33666) ([36dbe42](https://github.com/bitnami/charts/commit/36dbe424f82e0f8b28601ec0bd13610702a8599e)), closes [#33666](https://github.com/bitnami/charts/issues/33666)
## <small>21.0.3 (2025-05-13)</small>

View File

@@ -39,4 +39,4 @@ maintainers:
name: redis
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/redis
version: 21.0.4
version: 21.1.0

View File

@@ -83,12 +83,15 @@ data:
sentinel client-reconfig-script {{ .Values.sentinel.masterSet }} /opt/bitnami/scripts/start-scripts/push-master-label.sh
{{- end }}
{{- if .Values.auth.acl.sentinel }}
{{- range .Values.auth.acl.users }}
{{- $userSecret := .Values.auth.acl.userSecret -}}
# Sentinel ACL configuration, only for users with password
{{ if .password }}
user {{ .username }} {{ default "on" .enabled }} {{ if .password }}#{{ sha256sum .password }}{{ else }}nopass{{ end }} ~* &* +@all
{{- range .Values.auth.acl.users }}
{{- $userPassword := .password | default "" }}
{{- $secretPassword := ternary "" (include "common.secrets.get" (dict "secret" $userSecret "key" .username "context" $)) (empty $userSecret) }}
{{ if or $userPassword $secretPassword }}
user {{ .username }} {{ default "on" .enabled }} #{{ coalesce $secretPassword $userPassword | sha256sum }} ~* &* +@all
sentinel sentinel-user {{ .username }}
sentinel sentinel-pass {{ .password }}
sentinel sentinel-pass {{ coalesce $secretPassword $userPassword }}
{{- end }}
{{- end }}
{{- end }}