Skip to content

Commit 55f2637

Browse files
javsalgark8s-ci-robot
authored andcommitted
[stable/redis] Make volumePermissions init container optional (helm#11029)
* [stable/redis] Make volumePermissions init container optional Signed-off-by: Javier J. Salmeron Garcia <[email protected]> * Bump chart to major version Signed-off-by: Javier J. Salmeron Garcia <[email protected]> * Update readme for upgrading Signed-off-by: Javier J. Salmeron Garcia <[email protected]>
1 parent 471f21f commit 55f2637

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

stable/redis/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: redis
2-
version: 5.5.0
2+
version: 6.0.0
33
appVersion: 4.0.12
44
description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
55
keywords:

stable/redis/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ The following table lists the configurable parameters of the Redis chart and the
167167
| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (redis master pod) | `1` |
168168
| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` |
169169
| `master.priorityClassName` | Redis Master pod priorityClassName | {} |
170+
| `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` |
170171
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
171172
| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` |
172173
| `volumePermissions.image.tag` | Init container volume-permissions image tag | `latest` |
@@ -276,3 +277,9 @@ sysctlImage:
276277
sysctl -w net.core.somaxconn=10000
277278
echo never > /host-sys/kernel/mm/transparent_hugepage/enabled
278279
```
280+
281+
## Upgrade
282+
283+
## To 6.0.0
284+
285+
Previous versions of the chart were using an init-container to change the permissions of the volumes. This was done in case the `securityContext` directive in the template was not enough for that (for example, with cephFS). In this new version of the chart, this container is disabled by default (which should not affect most of the deployments). If your installation still requires that init container, execute `helm upgrade` with the `--set volumePermissions.enabled=true`.

stable/redis/templates/redis-master-statefulset.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ spec:
152152
- name: config
153153
mountPath: /opt/bitnami/redis/etc
154154
{{- end }}
155-
{{- $needsVolumePermissions := and ( and .Values.master.persistence.enabled (not .Values.persistence.existingClaim) ) .Values.master.securityContext.enabled }}
155+
{{- $needsVolumePermissions := and .Values.volumePermissions.enabled (and ( and .Values.master.persistence.enabled (not .Values.persistence.existingClaim) ) .Values.master.securityContext.enabled) }}
156156
{{- if or $needsVolumePermissions .Values.sysctlImage.enabled }}
157157
initContainers:
158158
{{- if $needsVolumePermissions }}

stable/redis/values-production.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ metrics:
364364
## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup
365365
##
366366
volumePermissions:
367+
enabled: false
367368
image:
368369
registry: docker.io
369370
repository: bitnami/minideb

stable/redis/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ metrics:
365365
## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup
366366
##
367367
volumePermissions:
368+
enabled: false
368369
image:
369370
registry: docker.io
370371
repository: bitnami/minideb

0 commit comments

Comments
 (0)