Skip to content

Commit

Permalink
Merge pull request #50 from halkeye/fix-annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
travisghansen authored Jan 3, 2024
2 parents 5fb9812 + 6a372c1 commit 1706135
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stable/democratic-csi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 6 additions & 5 deletions stable/democratic-csi/templates/storage-classes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 1706135

Please sign in to comment.