diff --git a/bitnami/valkey-cluster/CHANGELOG.md b/bitnami/valkey-cluster/CHANGELOG.md index 38f5758985ad70..36ae13c0720222 100644 --- a/bitnami/valkey-cluster/CHANGELOG.md +++ b/bitnami/valkey-cluster/CHANGELOG.md @@ -1,8 +1,12 @@ # Changelog -## 2.2.0 (2025-02-21) +## 2.2.1 (2025-03-21) -* [bitnami/valkey-cluster] Set `usePasswordFiles=true` by default ([#32122](https://github.com/bitnami/charts/pull/32122)) +* [bitnami/valkey-cluster] Add support for templating nodes, replicas, resources, and persistent storage values ([#32520](https://github.com/bitnami/charts/pull/32520)) + +## 2.2.0 (2025-02-24) + +* [bitnami/valkey-cluster] Set `usePasswordFiles=true` by default (#32122) ([c46b8f0](https://github.com/bitnami/charts/commit/c46b8f0029226245c04a3fed93225e82a9ab3e57)), closes [#32122](https://github.com/bitnami/charts/issues/32122) ## 2.1.3 (2025-02-20) diff --git a/bitnami/valkey-cluster/Chart.yaml b/bitnami/valkey-cluster/Chart.yaml index b6e705b014a53e..223265fe151909 100644 --- a/bitnami/valkey-cluster/Chart.yaml +++ b/bitnami/valkey-cluster/Chart.yaml @@ -34,4 +34,4 @@ name: valkey-cluster sources: - https://github.com/bitnami/charts/tree/main/bitnami/valkey-cluster - https://github.com/bitnami/containers/tree/main/bitnami/vakey-cluster -version: 2.2.0 +version: 2.2.1 diff --git a/bitnami/valkey-cluster/templates/update-cluster.yaml b/bitnami/valkey-cluster/templates/update-cluster.yaml index 379da54386c3e2..11db5aab785ca5 100644 --- a/bitnami/valkey-cluster/templates/update-cluster.yaml +++ b/bitnami/valkey-cluster/templates/update-cluster.yaml @@ -207,7 +207,7 @@ spec: value: {{ .Values.valkey.containerPorts.valkey | quote }} {{- end }} - name: VALKEY_CLUSTER_REPLICAS - value: {{ .Values.cluster.replicas | quote }} + value: {{ if eq (typeOf .Values.cluster.replicas) "float64" -}}{{ .Values.cluster.replicas | quote }}{{- else -}}{{ tpl .Values.cluster.replicas . | quote }}{{- end }} {{- if .Values.usePassword }} - name: REDISCLI_AUTH valueFrom: diff --git a/bitnami/valkey-cluster/templates/valkey-statefulset.yaml b/bitnami/valkey-cluster/templates/valkey-statefulset.yaml index 0f44b7376f2e3f..da7b1fe4d07cf1 100644 --- a/bitnami/valkey-cluster/templates/valkey-statefulset.yaml +++ b/bitnami/valkey-cluster/templates/valkey-statefulset.yaml @@ -20,7 +20,7 @@ spec: {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.valkey.podLabels .Values.commonLabels ) "context" . ) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} - replicas: {{ .Values.cluster.nodes }} + replicas: {{ if eq (typeOf .Values.cluster.nodes) "float64" -}}{{ .Values.cluster.nodes }}{{- else -}}{{ tpl .Values.cluster.nodes . | int }}{{- end }} serviceName: {{ include "common.names.fullname" . }}-headless podManagementPolicy: {{ .Values.valkey.podManagementPolicy }} template: @@ -116,7 +116,7 @@ spec: {{- if .Values.cluster.init }} if [[ "$pod_index" == "0" ]]; then export VALKEY_CLUSTER_CREATOR="yes" - export VALKEY_CLUSTER_REPLICAS="{{ .Values.cluster.replicas }}" + export VALKEY_CLUSTER_REPLICAS="{{ if eq (typeOf .Values.cluster.replicas) "float64" -}}{{ .Values.cluster.replicas | quote }}{{- else -}}{{ tpl .Values.cluster.replicas . | int }}{{- end }}" fi {{- end }} /opt/bitnami/scripts/valkey-cluster/entrypoint.sh /opt/bitnami/scripts/valkey-cluster/run.sh @@ -133,7 +133,7 @@ spec: pod_index="${pod_index[-1]}" if [[ "$pod_index" == "0" ]]; then export VALKEY_CLUSTER_CREATOR="yes" - export VALKEY_CLUSTER_REPLICAS="{{ .Values.cluster.replicas }}" + export VALKEY_CLUSTER_REPLICAS="{{ if eq (typeOf .Values.cluster.replicas) "float64" -}}{{ .Values.cluster.replicas | quote }}{{- else -}}{{ tpl .Values.cluster.replicas . | int }}{{- end }}" fi {{- end }} /opt/bitnami/scripts/valkey-cluster/entrypoint.sh /opt/bitnami/scripts/valkey-cluster/run.sh @@ -153,7 +153,7 @@ spec: value: "no" {{- else }} - name: VALKEY_NODES - value: "{{ $count := .Values.cluster.nodes | int }}{{ range $i, $v := until $count }}{{ include "common.names.fullname" $ }}-{{ $i }}.{{ template "common.names.fullname" $ }}-headless {{ end }}" + value: '{{- $count := 0 -}}{{ if eq (typeOf .Values.cluster.replicas) "float64" -}}{{ $count = .Values.cluster.nodes | int }}{{- else -}}{{ $count = tpl .Values.cluster.nodes . | int }}{{- end -}}{{ range $i, $v := until $count }}{{ include "common.names.fullname" $ }}-{{ $i }}.{{ template "common.names.fullname" $ }}-headless {{ end }}' {{- end }} {{- if .Values.usePassword }} - name: REDISCLI_AUTH @@ -267,7 +267,7 @@ spec: {{- end }} {{- end }} {{- if .Values.valkey.resources }} - resources: {{- toYaml .Values.valkey.resources | nindent 12 }} + resources: {{- include "common.tplvalues.render" (dict "value" .Values.valkey.resources "context" $) | nindent 12 }} {{- else if ne .Values.valkey.resourcesPreset "none" }} resources: {{- include "common.resources.preset" (dict "type" .Values.valkey.resourcesPreset) | nindent 12 }} {{- end }} @@ -492,7 +492,7 @@ spec: {{- end }} resources: requests: - storage: {{ .Values.persistence.size | quote }} + storage: {{ tpl .Values.persistence.size . | quote }} {{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 8 }} {{- if or .Values.persistence.matchLabels .Values.persistence.matchExpressions }} selector: