diff --git a/stable/osclass/Chart.yaml b/stable/osclass/Chart.yaml index ad0bbde96d..da5d92e3a8 100644 --- a/stable/osclass/Chart.yaml +++ b/stable/osclass/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: osclass -version: 6.1.0 +version: 6.1.1 appVersion: 3.7.4 description: Osclass is a php script that allows you to quickly create and manage your own free classifieds site. diff --git a/stable/osclass/templates/_helpers.tpl b/stable/osclass/templates/_helpers.tpl index 35c0ef57cf..ba3e322554 100644 --- a/stable/osclass/templates/_helpers.tpl +++ b/stable/osclass/templates/_helpers.tpl @@ -145,18 +145,33 @@ imagePullSecrets: Return the proper Storage Class */}} {{- define "osclass.storageClass" -}} -{{- $storageClass := "" }} -{{- if .Values.persistence.osclass.storageClass -}} - {{- $storageClass = .Values.persistence.osclass.storageClass -}} -{{- end -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} {{- if .Values.global -}} {{- if .Values.global.storageClass -}} - {{- $storageClass = .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "\"\"" -}} + {{- else }} + {{- printf "%s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.persistence.osclass.torageClass -}} + {{- if (eq "-" .Values.persistence.osclass.torageClass) -}} + {{- printf "\"\"" -}} + {{- else }} + {{- printf "%s" .Values.persistence.osclass.torageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.persistence.osclass.torageClass -}} + {{- if (eq "-" .Values.persistence.osclass.torageClass) -}} + {{- printf "\"\"" -}} + {{- else }} + {{- printf "%s" .Values.persistence.osclass.torageClass -}} + {{- end -}} {{- end -}} {{- end -}} -{{- if (eq "-" $storageClass) -}} - {{- printf "\"\"" -}} -{{- else }} - {{- printf "%s" $storageClass -}} -{{- end -}} {{- end -}}