fix(Common): correct SCALE detection on statefullset

This commit is contained in:
kjeld Schouten-Lebbing 2021-10-19 21:42:28 +02:00
parent 8bc56fa8fd
commit 36723f774c
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
2 changed files with 3 additions and 2 deletions

View File

@ -15,4 +15,4 @@ maintainers:
name: common
sources: null
type: library
version: 8.3.12
version: 8.3.13

View File

@ -3,6 +3,7 @@ This template serves as the blueprint for the StatefulSet objects that are creat
within the common library.
*/}}
{{- define "common.statefulset" }}
{{- $values := .Values }}
{{- $releaseName := .Release.Name }}
---
apiVersion: apps/v1
@ -64,7 +65,7 @@ spec:
storage: {{ required (printf "size is required for PVC %v" $vct.name) $vct.size | quote }}
{{- if $vct.storageClass }}
storageClassName: {{ if (eq "-" $vct.storageClass) }}""{{- else if (eq "SCALE-ZFS" $vct.storageClass ) }}{{ ( printf "%v-%v" "ix-storage-class" $releaseName ) }}{{- else }}{{ $vct.storageClass | quote }}{{- end }}
{{- else if .Values.ixChartContext }}
{{- else if $values.ixChartContext }}
storageClassName: {{ printf "%v-%v" "ix-storage-class" .Release.Name }}
{{- end }}
{{- end }}