From 2d398cd6963ca7efa069abcf4eb333ab5fd58cbc Mon Sep 17 00:00:00 2001 From: bitnami-bot Date: Wed, 20 Feb 2019 12:36:28 +0000 Subject: [PATCH] Synchronize upstreamed folder to fd2055e9f --- upstreamed/redis/Chart.yaml | 2 +- .../templates/redis-master-statefulset.yaml | 5 ++++- .../templates/redis-slave-deployment.yaml | 20 +++++++++++++++++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/upstreamed/redis/Chart.yaml b/upstreamed/redis/Chart.yaml index dff5aaddc..b6d925c29 100644 --- a/upstreamed/redis/Chart.yaml +++ b/upstreamed/redis/Chart.yaml @@ -1,5 +1,5 @@ name: redis -version: 6.1.0 +version: 6.1.1 appVersion: 4.0.12 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: diff --git a/upstreamed/redis/templates/redis-master-statefulset.yaml b/upstreamed/redis/templates/redis-master-statefulset.yaml index f0558db60..1f87c0dba 100644 --- a/upstreamed/redis/templates/redis-master-statefulset.yaml +++ b/upstreamed/redis/templates/redis-master-statefulset.yaml @@ -41,7 +41,6 @@ spec: {{- if .Values.master.securityContext.enabled }} securityContext: fsGroup: {{ .Values.master.securityContext.fsGroup }} - runAsUser: {{ .Values.master.securityContext.runAsUser }} {{- end }} serviceAccountName: "{{ template "redis.serviceAccountName" . }}" {{- if .Values.master.priorityClassName }} @@ -66,6 +65,10 @@ spec: - name: {{ template "redis.fullname" . }} image: "{{ template "redis.image" . }}" imagePullPolicy: {{ default "" .Values.image.pullPolicy | quote }} + {{- if .Values.master.securityContext.enabled }} + securityContext: + runAsUser: {{ .Values.master.securityContext.runAsUser }} + {{- end }} command: - /bin/bash - -c diff --git a/upstreamed/redis/templates/redis-slave-deployment.yaml b/upstreamed/redis/templates/redis-slave-deployment.yaml index 981290a10..54bc9d948 100644 --- a/upstreamed/redis/templates/redis-slave-deployment.yaml +++ b/upstreamed/redis/templates/redis-slave-deployment.yaml @@ -45,8 +45,15 @@ spec: - name: {{ . }} {{- end}} {{- end}} - {{- /* Include master securityContext if slave securityContext not defined */ -}} - {{ include "redis.slave.securityContext" . | indent 6 }} + {{- /* Include master securityContext.fsGroup if slave securityContext.fsGroup not defined */ -}} + {{- if (.Values.slave.securityContext | default .Values.master.securityContext) }} + securityContext: + {{- if .Values.slave.securityContext }} + fsGroup: {{ .Values.slave.securityContext.fsGroup }} + {{- else }} + fsGroup: {{ .Values.master.securityContext.fsGroup }} + {{- end }} + {{- end }} serviceAccountName: "{{ template "redis.serviceAccountName" . }}" {{- if .Values.slave.priorityClassName }} priorityClassName: "{{ .Values.slave.priorityClassName }}" @@ -71,6 +78,15 @@ spec: image: {{ template "redis.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy | default "" | quote }} {{- $command := default .Values.master.command .Values.slave.command }} + {{- /* Include master securityContext.runAsUser if slave securityContext.runAsUser not defined */ -}} + {{- if (.Values.slave.securityContext | default .Values.master.securityContext) }} + securityContext: + {{- if .Values.slave.securityContext }} + runAsUser: {{ .Values.slave.securityContext.runAsUser }} + {{- else }} + runAsUser: {{ .Values.master.securityContext.runAsUser }} + {{- end }} + {{- end }} command: - /bin/bash - -c