fix(common): correctly set defaults for volumeclaimtemplates and pvc's (#1334)

* fix(common): correctly set defaults for volumeclaimtemplates and pvc's

* polish

* more polish

* hmmm

* whoops

* hmm

* hmm

* again....

* different

* fixes
This commit is contained in:
Kjeld Schouten-Lebbing 2021-11-15 19:30:09 +01:00 committed by GitHub
parent b858f31ba3
commit e2c09231d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -15,4 +15,4 @@ maintainers:
name: common
sources: null
type: library
version: 8.6.0
version: 8.6.1

View File

@ -59,13 +59,13 @@ spec:
name: {{ $vctname }}
spec:
accessModes:
- {{ required (printf "accessMode is required for vCT %v" $vct.name) $vct.accessMode | quote }}
- {{ ( $vct.accessMode | default "ReadWriteOnce" ) | quote }}
resources:
requests:
storage: {{ required (printf "size is required for PVC %v" $vct.name) $vct.size | quote }}
storage: {{ $vct.size | default "999Gi" | 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 or ( $values.global.isSCALE ) ( $values.ixChartContext ) ( $values.global.ixChartContext ) }}
storageClassName: {{ printf "%v-%v" "ix-storage-class" $releaseName }}
{{- end }}
{{- end }}

View File

@ -45,7 +45,7 @@ spec:
storage: {{ $values.size | default "999Gi" | quote }}
{{- if $values.storageClass }}
storageClassName: {{ if (eq "-" $values.storageClass) }}""{{- else if (eq "SCALE-ZFS" $values.storageClass ) }}{{ ( printf "%v-%v" "ix-storage-class" .Release.Name ) }}{{- else }}{{ $values.storageClass | quote }}{{- end }}
{{- else if $.Values.global.isSCALE }}
{{- else if or ( $.Values.global.isSCALE ) ( $.Values.ixChartContext ) ( $.Values.global.ixChartContext ) }}
storageClassName: {{ ( printf "%v-%v" "ix-storage-class" .Release.Name ) }}
{{- end }}
{{- if $values.volumeName }}