From 2aba9c46421d025dcd5e1406f45ac19367378b0f Mon Sep 17 00:00:00 2001 From: Alejandro Moreno <47833905+alemorcuq@users.noreply.github.com> Date: Thu, 22 Aug 2019 17:12:32 +0200 Subject: [PATCH] Fix 'storageClass' macros (#16546) Signed-off-by: Alejandro Moreno --- stable/mongodb/Chart.yaml | 2 +- stable/mongodb/templates/_helpers.tpl | 12 ++++++------ stable/mongodb/templates/pvc-standalone.yaml | 2 +- stable/mongodb/templates/statefulset-primary-rs.yaml | 2 +- .../mongodb/templates/statefulset-secondary-rs.yaml | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/stable/mongodb/Chart.yaml b/stable/mongodb/Chart.yaml index 8ec9df8f3f..5d20f475f5 100644 --- a/stable/mongodb/Chart.yaml +++ b/stable/mongodb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mongodb -version: 7.2.1 +version: 7.2.2 appVersion: 4.0.12 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/stable/mongodb/templates/_helpers.tpl b/stable/mongodb/templates/_helpers.tpl index 89c1d9b6bc..e6c16215d9 100644 --- a/stable/mongodb/templates/_helpers.tpl +++ b/stable/mongodb/templates/_helpers.tpl @@ -202,25 +202,25 @@ but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else {{- if .Values.global -}} {{- if .Values.global.storageClass -}} {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "\"\"" -}} + {{- printf "storageClassName: \"\"" -}} {{- else }} - {{- printf "%s" .Values.global.storageClass -}} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} {{- end -}} {{- else -}} {{- if .Values.persistence.storageClass -}} {{- if (eq "-" .Values.persistence.storageClass) -}} - {{- printf "\"\"" -}} + {{- printf "storageClassName: \"\"" -}} {{- else }} - {{- printf "%s" .Values.persistence.storageClass -}} + {{- printf "storageClassName: %s" .Values.persistence.storageClass -}} {{- end -}} {{- end -}} {{- end -}} {{- else -}} {{- if .Values.persistence.storageClass -}} {{- if (eq "-" .Values.persistence.storageClass) -}} - {{- printf "\"\"" -}} + {{- printf "storageClassName: \"\"" -}} {{- else }} - {{- printf "%s" .Values.persistence.storageClass -}} + {{- printf "storageClassName: %s" .Values.persistence.storageClass -}} {{- end -}} {{- end -}} {{- end -}} diff --git a/stable/mongodb/templates/pvc-standalone.yaml b/stable/mongodb/templates/pvc-standalone.yaml index 0aeab9fb56..b430671bd5 100644 --- a/stable/mongodb/templates/pvc-standalone.yaml +++ b/stable/mongodb/templates/pvc-standalone.yaml @@ -16,5 +16,5 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} - storageClassName: {{ include "mongodb.storageClass" . }} + {{ include "mongodb.storageClass" . }} {{- end }} diff --git a/stable/mongodb/templates/statefulset-primary-rs.yaml b/stable/mongodb/templates/statefulset-primary-rs.yaml index 56941d8583..03aec5af78 100644 --- a/stable/mongodb/templates/statefulset-primary-rs.yaml +++ b/stable/mongodb/templates/statefulset-primary-rs.yaml @@ -281,7 +281,7 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} - storageClassName: {{ include "mongodb.storageClass" . }} + {{ include "mongodb.storageClass" . }} {{- else }} - name: datadir emptyDir: {} diff --git a/stable/mongodb/templates/statefulset-secondary-rs.yaml b/stable/mongodb/templates/statefulset-secondary-rs.yaml index adacf2d859..61014a0dc1 100644 --- a/stable/mongodb/templates/statefulset-secondary-rs.yaml +++ b/stable/mongodb/templates/statefulset-secondary-rs.yaml @@ -255,7 +255,7 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} - storageClassName: {{ include "mongodb.storageClass" . }} + {{ include "mongodb.storageClass" . }} {{- else }} - name: datadir emptyDir: {}