Skip to content

Commit

Permalink
[bitnami/valkey] fix: sentinel pdb (#31020)
Browse files Browse the repository at this point in the history
* fix: sentinel pdb

Signed-off-by: Loic Roose <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <[email protected]>

* feat: update pdb template

Signed-off-by: Loic Roose <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <[email protected]>

---------

Signed-off-by: Loic Roose <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Co-authored-by: Bitnami Containers <[email protected]>
  • Loading branch information
R-Loic and bitnami-bot authored Dec 17, 2024
1 parent b3b4ac7 commit 711d831
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
7 changes: 6 additions & 1 deletion bitnami/valkey/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Changelog

## 2.2.1 (2024-12-17)

* [bitnami/valkey] fix: sentinel pdb ([#31020](https://github.com/bitnami/charts/pull/31020))

## 2.2.0 (2024-12-10)

* [bitnami/valkey] Detect non-standard images ([#30950](https://github.com/bitnami/charts/pull/30950))
* [bitnami/*] Add Bitnami Premium to NOTES.txt (#30854) ([3dfc003](https://github.com/bitnami/charts/commit/3dfc00376df6631f0ce54b8d440d477f6caa6186)), closes [#30854](https://github.com/bitnami/charts/issues/30854)
* [bitnami/valkey] Detect non-standard images (#30950) ([3145dda](https://github.com/bitnami/charts/commit/3145ddaddcf99d4e23609a67e9740acfb589bc97)), closes [#30950](https://github.com/bitnami/charts/issues/30950)

## <small>2.1.2 (2024-12-05)</small>

Expand Down
2 changes: 1 addition & 1 deletion bitnami/valkey/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ maintainers:
name: valkey
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/valkey
version: 2.2.0
version: 2.2.1
11 changes: 6 additions & 5 deletions bitnami/valkey/templates/primary/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- if and .Values.primary.pdb.create (gt (int64 .Values.primary.count) 0) (or (eq .Values.architecture "replication") (not .Values.sentinel.enabled)) }}
{{- $pdb := coalesce .Values.pdb .Values.primary.pdb }}
{{- if and $pdb.create (gt (int64 .Values.primary.count) 0) (or (not (eq .Values.architecture "replication")) (not .Values.sentinel.enabled)) }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand All @@ -15,11 +16,11 @@ metadata:
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.primary.pdb.minAvailable }}
minAvailable: {{ .Values.primary.pdb.minAvailable }}
{{- if $pdb.minAvailable }}
minAvailable: {{ $pdb.minAvailable }}
{{- end }}
{{- if or .Values.primary.pdb.maxUnavailable (not .Values.primary.pdb.minAvailable)}}
maxUnavailable: {{ .Values.primary.pdb.maxUnavailable | default 1 }}
{{- if or $pdb.maxUnavailable (not $pdb.minAvailable)}}
maxUnavailable: {{ $pdb.maxUnavailable | default 1 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
Expand Down
2 changes: 1 addition & 1 deletion bitnami/valkey/templates/replicas/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- $pdb := coalesce .Values.replica.pdb .Values.pdb }}
{{- $pdb := coalesce .Values.pdb .Values.replica.pdb }}
{{- if and (eq .Values.architecture "replication") (not .Values.sentinel.enabled) $pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
Expand Down
12 changes: 6 additions & 6 deletions bitnami/valkey/templates/sentinel/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- if and (eq .Values.architecture "replication") (not .Values.sentinel.enabled) .Values.replica.pdb.create }}
{{- $pdb := coalesce .Values.pdb .Values.replica.pdb }}
{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled $pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
Expand All @@ -15,11 +15,11 @@ metadata:
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.replica.pdb.minAvailable }}
minAvailable: {{ .Values.replica.pdb.minAvailable }}
{{- if $pdb.minAvailable }}
minAvailable: {{ $pdb.minAvailable }}
{{- end }}
{{- if or .Values.replica.pdb.maxUnavailable (not .Values.replica.pdb.minAvailable) }}
maxUnavailable: {{ .Values.replica.pdb.maxUnavailable | default 1 }}
{{- if or $pdb.maxUnavailable (not $pdb.minAvailable) }}
maxUnavailable: {{ $pdb.maxUnavailable | default 1 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
Expand Down

0 comments on commit 711d831

Please sign in to comment.