From 042f016a84e6919f0784d5f6404244e5274503ab Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Mon, 1 Jan 2024 10:31:12 -0800 Subject: [PATCH 1/2] Make sure annotations is only outputted when there are some --- stable/democratic-csi/templates/storage-classes.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 }} From 6a372c1170c0c304d9e6d7e039444503b62af1e6 Mon Sep 17 00:00:00 2001 From: Gavin Mogan Date: Tue, 2 Jan 2024 17:38:12 -0800 Subject: [PATCH 2/2] bump version --- stable/democratic-csi/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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