From e4e702c86f2dc8928141d8d3d122ef92cbbe48bb Mon Sep 17 00:00:00 2001 From: bitnami-bot Date: Thu, 27 Sep 2018 10:37:16 +0000 Subject: [PATCH] Synchronize upstreamed folder to ff57107 --- upstreamed/mongodb/Chart.yaml | 2 +- upstreamed/mongodb/README.md | 1 + upstreamed/redis/Chart.yaml | 2 +- upstreamed/redis/README.md | 4 ++++ upstreamed/redis/templates/_helpers.tpl | 10 ++++++++++ .../redis/templates/redis-master-statefulset.yaml | 13 +++++++++++++ upstreamed/redis/values-production.yaml | 12 ++++++++++++ upstreamed/redis/values.yaml | 12 ++++++++++++ 8 files changed, 54 insertions(+), 2 deletions(-) diff --git a/upstreamed/mongodb/Chart.yaml b/upstreamed/mongodb/Chart.yaml index 79df72a23..2303f0d1e 100644 --- a/upstreamed/mongodb/Chart.yaml +++ b/upstreamed/mongodb/Chart.yaml @@ -1,5 +1,5 @@ name: mongodb -version: 4.3.5 +version: 4.3.6 appVersion: 4.0.2 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. keywords: diff --git a/upstreamed/mongodb/README.md b/upstreamed/mongodb/README.md index afc56346a..3a502eacf 100644 --- a/upstreamed/mongodb/README.md +++ b/upstreamed/mongodb/README.md @@ -84,6 +84,7 @@ The following table lists the configurable parameters of the MongoDB chart and t | `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | | `persistence.size` | Size of data volume | `8Gi` | | `persistence.annotations` | Persistent Volume annotations | `{}` | +| `persistence.existingClaim` | Name of an existing PVC to use (avoids creating one if this is given) | `nil` | | `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `30` | | `livenessProbe.periodSeconds` | How often to perform the probe | `10` | | `livenessProbe.timeoutSeconds` | When the probe times out | `5` | diff --git a/upstreamed/redis/Chart.yaml b/upstreamed/redis/Chart.yaml index a3f99446c..799409f17 100644 --- a/upstreamed/redis/Chart.yaml +++ b/upstreamed/redis/Chart.yaml @@ -1,5 +1,5 @@ name: redis -version: 4.0.1 +version: 4.1.0 appVersion: 4.0.11 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/README.md b/upstreamed/redis/README.md index 5a4befad9..9fdf8d12b 100644 --- a/upstreamed/redis/README.md +++ b/upstreamed/redis/README.md @@ -146,6 +146,10 @@ The following table lists the configurable parameters of the Redis chart and the | `master.readinessProbe.timeoutSeconds` | When the probe times out (redis master pod) | `1` | | `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (redis master pod) | `1` | | `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `alpine` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `3.8` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` | | `slave.serviceType` | Kubernetes Service type (redis slave) | `LoadBalancer` | | `slave.service.nodePort` | Kubernetes Service nodePort (redis slave) | `nil` | | `slave.service.annotations` | annotations for redis slave service | {} | diff --git a/upstreamed/redis/templates/_helpers.tpl b/upstreamed/redis/templates/_helpers.tpl index 8eb047a89..9efb959e1 100644 --- a/upstreamed/redis/templates/_helpers.tpl +++ b/upstreamed/redis/templates/_helpers.tpl @@ -62,6 +62,16 @@ Return the proper image name (for the metrics image) {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} {{- end -}} +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} + {{/* Return slave readiness probe */}} diff --git a/upstreamed/redis/templates/redis-master-statefulset.yaml b/upstreamed/redis/templates/redis-master-statefulset.yaml index 7a77518fb..eb4526b06 100644 --- a/upstreamed/redis/templates/redis-master-statefulset.yaml +++ b/upstreamed/redis/templates/redis-master-statefulset.yaml @@ -134,6 +134,19 @@ spec: mountPath: /opt/bitnami/redis/etc/redis.conf subPath: redis.conf {{- end }} + {{- if and ( and .Values.master.persistence.enabled (not .Values.persistence.existingClaim) ) .Values.master.securityContext.enabled }} + initContainers: + - name: volume-permissions + image: "{{ template "volumePermissions.image" . }}" + imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }} + command: ["/bin/chown", "-R", "{{ .Values.master.securityContext.runAsUser }}:{{ .Values.master.securityContext.fsGroup }}", "{{ .Values.master.persistence.path }}"] + securityContext: + runAsUser: 0 + volumeMounts: + - name: redis-data + mountPath: {{ .Values.master.persistence.path }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} volumes: - name: health configMap: diff --git a/upstreamed/redis/values-production.yaml b/upstreamed/redis/values-production.yaml index e71e28a93..abda34409 100644 --- a/upstreamed/redis/values-production.yaml +++ b/upstreamed/redis/values-production.yaml @@ -317,6 +317,18 @@ metrics: # podAnnotations: {} # podLabels: {} +## +## Init containers parameters: +## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup +## + +volumePermissions: + image: + registry: docker.io + repository: busybox + tag: latest + pullPolicy: IfNotPresent + ## Redis config file ## configmap: |- diff --git a/upstreamed/redis/values.yaml b/upstreamed/redis/values.yaml index 287929220..e2958451c 100644 --- a/upstreamed/redis/values.yaml +++ b/upstreamed/redis/values.yaml @@ -332,6 +332,18 @@ metrics: # podAnnotations: {} # podLabels: {} +## +## Init containers parameters: +## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup +## + +volumePermissions: + image: + registry: docker.io + repository: busybox + tag: latest + pullPolicy: IfNotPresent + ## Redis config file ## configmap: |-