Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/redis] Add support to execute Redis as root
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel A. Cabrera Minagorri <[email protected]>
  • Loading branch information
miguelaeh committed Jul 7, 2019
1 parent ca77541 commit 1b21c0f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/redis/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: redis
version: 8.0.17
version: 8.0.18
appVersion: 5.0.5
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.
keywords:
Expand Down
4 changes: 4 additions & 0 deletions stable/redis/templates/redis-master-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ spec:
- /bin/bash
- -c
- |
{{- if (eq .Values.securityContext.runAsUser 0.0) }}
useradd redis
chown -R redis /data
{{- end }}
if [[ -n $REDIS_PASSWORD_FILE ]]; then
password_aux=`cat ${REDIS_PASSWORD_FILE}`
export REDIS_PASSWORD=$password_aux
Expand Down
4 changes: 4 additions & 0 deletions stable/redis/templates/redis-slave-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ spec:
- /bin/bash
- -c
- |
{{- if (eq .Values.securityContext.runAsUser 0.0) }}
useradd redis
chown -R redis /data
{{- end }}
if [[ -n $REDIS_PASSWORD_FILE ]]; then
password_aux=`cat ${REDIS_PASSWORD_FILE}`
export REDIS_PASSWORD=$password_aux
Expand Down

0 comments on commit 1b21c0f

Please sign in to comment.