diff --git a/stable/democratic-csi/Chart.yaml b/stable/democratic-csi/Chart.yaml index 61adc28..7213d83 100644 --- a/stable/democratic-csi/Chart.yaml +++ b/stable/democratic-csi/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 appVersion: "1.0" description: csi storage for container orchestration systems name: democratic-csi -version: 0.14.3 +version: 0.14.4 diff --git a/stable/democratic-csi/templates/storage-classes.yaml b/stable/democratic-csi/templates/storage-classes.yaml index 2f6d036..661a94d 100644 --- a/stable/democratic-csi/templates/storage-classes.yaml +++ b/stable/democratic-csi/templates/storage-classes.yaml @@ -3,18 +3,19 @@ {{- if .Values.storageClasses -}} {{- range .Values.storageClasses }} {{- $classRoot := . -}} +{{- $storageClassAnnotations := ( $classRoot.annotations | default dict ) }} +{{- if $classRoot.defaultClass }} +{{- $storageClassAnnotations = merge $storageClassAnnotations (dict "storageclass.kubernetes.io/is-default-class" $classRoot.defaultClass) }} +{{- end }} --- apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: {{ required "storage class name is required" $classRoot.name }} + {{- with $storageClassAnnotations }} annotations: - {{- with $classRoot.annotations }} {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $classRoot.defaultClass }} - storageclass.kubernetes.io/is-default-class: {{ $classRoot.defaultClass | quote }} - {{- end }} + {{- end }} labels: {{- with $classRoot.labels }} {{- toYaml . | nindent 4 }}