[bitnami/redis-cluster] Support persistentVolumeClaimRetentionPolicy for redis-cluster (#17155)

* feat: Added `persistentVolumeClaimRetentionPolicy` for redis-cluster

Signed-off-by: Kavin <kavinraja.ganesan@gmail.com>

* Fix metadata and update README

Signed-off-by: Kavin <kavinraja.ganesan@gmail.com>

---------

Signed-off-by: Kavin <kavinraja.ganesan@gmail.com>
This commit is contained in:
Kavinraja Ganesan
2023-06-20 16:11:48 +05:30
committed by GitHub
parent 55acf31b0e
commit e5ac69de73
4 changed files with 19 additions and 1 deletions

View File

@@ -22,4 +22,4 @@ maintainers:
name: redis-cluster
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/redis-cluster
version: 8.6.2
version: 8.6.3

View File

@@ -153,6 +153,9 @@ The command removes all the Kubernetes components associated with the chart and
| `persistence.size` | Size of data volume | `8Gi` |
| `persistence.matchLabels` | Persistent Volume selectors | `{}` |
| `persistence.matchExpressions` | matchExpressions Persistent Volume selectors | `{}` |
| `persistentVolumeClaimRetentionPolicy.enabled` | Controls if and how PVCs are deleted during the lifecycle of a StatefulSet | `false` |
| `persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` |
| `persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` |
| `volumePermissions.enabled` | Enable init container that changes volume permissions in the registry (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` |
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
| `volumePermissions.image.repository` | Init container volume-permissions image repository | `bitnami/bitnami-shell` |

View File

@@ -429,6 +429,11 @@ spec:
- name: redis-data
emptyDir: {}
{{- end }}
{{- if .Values.persistentVolumeClaimRetentionPolicy.enabled }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: {{ .Values.persistentVolumeClaimRetentionPolicy.whenDeleted }}
whenScaled: {{ .Values.persistentVolumeClaimRetentionPolicy.whenScaled }}
{{- end }}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates:
- metadata:

View File

@@ -332,6 +332,16 @@ persistence:
##
matchExpressions: {}
## persistentVolumeClaimRetentionPolicy
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
## @param persistentVolumeClaimRetentionPolicy.enabled Controls if and how PVCs are deleted during the lifecycle of a StatefulSet
## @param persistentVolumeClaimRetentionPolicy.whenScaled Volume retention behavior when the replica count of the StatefulSet is reduced
## @param persistentVolumeClaimRetentionPolicy.whenDeleted Volume retention behavior that applies when the StatefulSet is deleted
persistentVolumeClaimRetentionPolicy:
enabled: false
whenScaled: Retain
whenDeleted: Retain
## Init containers parameters:
## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup
##