Skip to content

Commit

Permalink
Prefix "StorageClass" filesystem type parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
NotTheEvilOne committed Feb 14, 2022
1 parent 027f65f commit 5aae95d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion charts/gardener-extension-provider-ionos/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,12 @@ scheduling.k8s.io/v1beta1
{{- else -}}
scheduling.k8s.io/v1alpha1
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "storageclassversion" -}}
{{- if semverCompare ">= 1.13-0" .Capabilities.KubeVersion.GitVersion -}}
storage.k8s.io/v1
{{- else -}}
storage.k8s.io/v1beta1
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ provisioner: csi.ionos.com
allowVolumeExpansion: true
parameters:
{{- if .Values.gardener.seed.spec.provider.providerConfig.fsType }}
fsType: {{ .Values.gardener.seed.spec.provider.providerConfig.fsType }}
csi.storage.k8s.io/fstype: {{ .Values.gardener.seed.spec.provider.providerConfig.fsType }}
{{- end }}
type: SSD
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ volumeBindingMode: {{ .Values.volumeBindingMode }}
reclaimPolicy: Delete
allowVolumeExpansion: {{ .Values.allowVolumeExpansion }}
parameters:
fsType: {{ .Values.fsType }}
csi.storage.k8s.io/fstype: {{ .Values.fsType }}
type: SSD
---
apiVersion: {{ include "storageclassversion" . }}
Expand All @@ -26,5 +26,5 @@ volumeBindingMode: {{ .Values.volumeBindingMode }}
reclaimPolicy: Delete
allowVolumeExpansion: {{ .Values.allowVolumeExpansion }}
parameters:
fsType: {{ .Values.fsType }}
csi.storage.k8s.io/fstype: {{ .Values.fsType }}
type: HDD

0 comments on commit 5aae95d

Please sign in to comment.