Skip to content

Commit

Permalink
Fix 'storageClass' macros (helm#16546)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Moreno <amoreno@bitnami.com>
  • Loading branch information
alemorcuq authored and Ram Sri committed Sep 30, 2019
1 parent 00157ca commit de80d3c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion 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:
Expand Down
12 changes: 6 additions & 6 deletions stable/mongodb/templates/_helpers.tpl
Expand Up @@ -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 -}}
Expand Down
2 changes: 1 addition & 1 deletion stable/mongodb/templates/pvc-standalone.yaml
Expand Up @@ -16,5 +16,5 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
storageClassName: {{ include "mongodb.storageClass" . }}
{{ include "mongodb.storageClass" . }}
{{- end }}
2 changes: 1 addition & 1 deletion stable/mongodb/templates/statefulset-primary-rs.yaml
Expand Up @@ -281,7 +281,7 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
storageClassName: {{ include "mongodb.storageClass" . }}
{{ include "mongodb.storageClass" . }}
{{- else }}
- name: datadir
emptyDir: {}
Expand Down
2 changes: 1 addition & 1 deletion stable/mongodb/templates/statefulset-secondary-rs.yaml
Expand Up @@ -255,7 +255,7 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
storageClassName: {{ include "mongodb.storageClass" . }}
{{ include "mongodb.storageClass" . }}
{{- else }}
- name: datadir
emptyDir: {}
Expand Down

0 comments on commit de80d3c

Please sign in to comment.