Skip to content

Commit 9cb94c6

Browse files
migruiz4Bitnami Containers
and
Bitnami Containers
authored
[bitnami/redis-cluster] Use ternary yes/no for useAOFPersistence (#32418)
* [bitnami/redis-cluster] Use ternary yes/no for useAOFPersistence Signed-off-by: Miguel Ruiz <[email protected]> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <[email protected]> --------- Signed-off-by: Miguel Ruiz <[email protected]> Signed-off-by: Bitnami Containers <[email protected]> Co-authored-by: Bitnami Containers <[email protected]>
1 parent 20e95a7 commit 9cb94c6

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

bitnami/redis-cluster/CHANGELOG.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Changelog
22

3-
## 11.4.3 (2025-02-20)
3+
## 11.4.5 (2025-03-12)
44

5-
* [bitnami/redis-cluster] Release 11.4.3 ([#32032](https://github.com/bitnami/charts/pull/32032))
5+
* [bitnami/redis-cluster] Use ternary yes/no for useAOFPersistence ([#32418](https://github.com/bitnami/charts/pull/32418))
6+
7+
## <small>11.4.3 (2025-02-20)</small>
8+
9+
* [bitnami/redis-cluster] Release 11.4.3 (#32032) ([e652611](https://github.com/bitnami/charts/commit/e65261189935c2a97a9998e9fca715c08a262e44)), closes [#32032](https://github.com/bitnami/charts/issues/32032)
610

711
## <small>11.4.2 (2025-02-16)</small>
812

bitnami/redis-cluster/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ maintainers:
3333
name: redis-cluster
3434
sources:
3535
- https://github.com/bitnami/charts/tree/main/bitnami/redis-cluster
36-
version: 11.4.3
36+
version: 11.4.5

bitnami/redis-cluster/templates/_helpers.tpl

+13
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,19 @@ Return Redis&reg; password
171171
{{- end -}}
172172
{{- end -}}
173173

174+
{{/*
175+
Returns true if useAOFPersistence should be enabled
176+
YAML will transform 'yes'/'no' into 'true'/'false' when quotes are missing, because it interprets the variable as boolean.
177+
Redis expects explicit 'yes'/'no', so this helper avoids issues when providing a boolean instead of a string.
178+
*/}}
179+
{{- define "redis-cluster.useAOFPersistence" -}}
180+
{{- if kindOf .Values.redis.useAOFPersistence | eq "bool" -}}
181+
{{ ternary "yes" "no" .Values.redis.useAOFPersistence }}
182+
{{- else -}}
183+
{{ print .Values.redis.useAOFPersistence }}
184+
{{- end -}}
185+
{{- end -}}
186+
174187
{{/*
175188
Determines whether or not to create the Statefulset
176189
*/}}

bitnami/redis-cluster/templates/redis-statefulset.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ spec:
181181
value: "yes"
182182
{{- end }}
183183
- name: REDIS_AOF_ENABLED
184-
value: {{ .Values.redis.useAOFPersistence | quote }}
184+
value: {{ include "redis-cluster.useAOFPersistence" . | quote }}
185185
- name: REDIS_TLS_ENABLED
186186
value: {{ ternary "yes" "no" .Values.tls.enabled | quote }}
187187
{{- if .Values.tls.enabled }}

0 commit comments

Comments
 (0)