[bitnami/redis] Enable PodDisruptionBudgets (#26355)

* [bitnami/redis] Enable PodDisruptionBudgets

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Amend PDB names

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

---------

Signed-off-by: Fran Mulero <fmulero@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Fran Mulero
2024-05-23 14:30:22 +02:00
committed by GitHub
co-authored by Bitnami Containers
parent 1864e422e2
commit 4890ba68ed
7 changed files with 633 additions and 555 deletions
+540 -535
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -36,4 +36,4 @@ maintainers:
name: redis
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/redis
version: 19.4.0
version: 19.5.0
+7 -3
View File
@@ -603,6 +603,9 @@ helm install my-release --set master.persistence.existingClaim=PVC_NAME oci://RE
| `master.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `master.serviceAccount.automountServiceAccountToken` | Whether to auto mount the service account token | `false` |
| `master.serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
| `master.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
| `master.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `{}` |
| `master.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `master.pdb.minAvailable` and `master.pdb.maxUnavailable` are empty. | `{}` |
### Redis&reg; replicas configuration parameters
@@ -727,6 +730,9 @@ helm install my-release --set master.persistence.existingClaim=PVC_NAME oci://RE
| `replica.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `replica.serviceAccount.automountServiceAccountToken` | Whether to auto mount the service account token | `false` |
| `replica.serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
| `replica.pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
| `replica.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `{}` |
| `replica.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `replica.pdb.minAvailable` and `replica.pdb.maxUnavailable` are empty. | `{}` |
### Redis&reg; Sentinel configuration parameters
@@ -862,9 +868,7 @@ helm install my-release --set master.persistence.existingClaim=PVC_NAME oci://RE
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `serviceAccount.automountServiceAccountToken` | Whether to auto mount the service account token | `false` |
| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
| `pdb.create` | Specifies whether a PodDisruptionBudget should be created | `false` |
| `pdb.minAvailable` | Min number of pods that must still be available after the eviction | `1` |
| `pdb.maxUnavailable` | Max number of pods that can be unavailable after the eviction | `""` |
| `pdb` | DEPRECATED Please use `master.pdb` and `replica.pdb` values instead | `{}` |
| `tls.enabled` | Enable TLS traffic | `false` |
| `tls.authClients` | Require clients to authenticate | `true` |
| `tls.autoGenerated` | Enable autogenerated certificates | `false` |
+27
View File
@@ -0,0 +1,27 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.master.pdb.create (gt (int64 .Values.master.count) 0) (or (eq .Values.architecture "replication") (not .Values.sentinel.enabled)) }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ printf "%s-master" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: master
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.master.pdb.minAvailable }}
minAvailable: {{ .Values.master.pdb.minAvailable }}
{{- end }}
{{- if or .Values.master.pdb.maxUnavailable (not .Values.master.pdb.minAvailable)}}
maxUnavailable: {{ .Values.master.pdb.maxUnavailable | default 1 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: master
{{- end }}
@@ -3,23 +3,26 @@ Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.pdb.create }}
{{- $pdb := coalesce .Values.replica.pdb .Values.pdb }}
{{- if and (eq .Values.architecture "replication") (not .Values.sentinel.enabled) $pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "common.names.fullname" . }}
name: {{ printf "%s-replicas" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: replica
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- if $pdb.minAvailable }}
minAvailable: {{ $pdb.minAvailable }}
{{- end }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- 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 }}
app.kubernetes.io/component: replica
{{- end }}
+27
View File
@@ -0,0 +1,27 @@
{{- /*
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 }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ printf "%s-node" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: node
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.replica.pdb.minAvailable }}
minAvailable: {{ .Values.replica.pdb.minAvailable }}
{{- end }}
{{- if or .Values.replica.pdb.maxUnavailable (not .Values.replica.pdb.minAvailable) }}
maxUnavailable: {{ .Values.replica.pdb.maxUnavailable | default 1 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: node
{{- end }}
+22 -10
View File
@@ -618,6 +618,16 @@ master:
## @param master.serviceAccount.annotations Additional custom annotations for the ServiceAccount
##
annotations: {}
## Pod Disruption Budget configuration
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
## @param master.pdb.create Enable/disable a Pod Disruption Budget creation
## @param master.pdb.minAvailable [object] Minimum number/percentage of pods that should remain scheduled
## @param master.pdb.maxUnavailable [object] Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `master.pdb.minAvailable` and `master.pdb.maxUnavailable` are empty.
##
pdb:
create: true
minAvailable: ""
maxUnavailable: ""
## @section Redis&reg; replicas configuration parameters
##
replica:
@@ -1090,6 +1100,16 @@ replica:
## @param replica.serviceAccount.annotations Additional custom annotations for the ServiceAccount
##
annotations: {}
## Pod Disruption Budget configuration
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
## @param replica.pdb.create Enable/disable a Pod Disruption Budget creation
## @param replica.pdb.minAvailable [object] Minimum number/percentage of pods that should remain scheduled
## @param replica.pdb.maxUnavailable [object] Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `replica.pdb.minAvailable` and `replica.pdb.maxUnavailable` are empty.
##
pdb:
create: true
minAvailable: ""
maxUnavailable: ""
## @section Redis&reg; Sentinel configuration parameters
##
@@ -1612,17 +1632,9 @@ serviceAccount:
annotations: {}
## Redis&reg; Pod Disruption Budget configuration
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
## @param pdb DEPRECATED Please use `master.pdb` and `replica.pdb` values instead
##
pdb:
## @param pdb.create Specifies whether a PodDisruptionBudget should be created
##
create: false
## @param pdb.minAvailable Min number of pods that must still be available after the eviction
##
minAvailable: 1
## @param pdb.maxUnavailable Max number of pods that can be unavailable after the eviction
##
maxUnavailable: ""
pdb: {}
## TLS configuration
##
tls: