From 5aae95d0f379949c1ea66f621d5fdbe5c5a403fd Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Mon, 14 Feb 2022 07:53:44 +0100 Subject: [PATCH] Prefix "StorageClass" filesystem type parameters --- .../templates/_helpers.tpl | 10 +++++++++- .../templates/storageclass.yaml | 2 +- .../shoot-storageclasses/templates/storageclasses.yaml | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/charts/gardener-extension-provider-ionos/templates/_helpers.tpl b/charts/gardener-extension-provider-ionos/templates/_helpers.tpl index 2596de8e..7de1ec03 100644 --- a/charts/gardener-extension-provider-ionos/templates/_helpers.tpl +++ b/charts/gardener-extension-provider-ionos/templates/_helpers.tpl @@ -34,4 +34,12 @@ scheduling.k8s.io/v1beta1 {{- else -}} scheduling.k8s.io/v1alpha1 {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{- define "storageclassversion" -}} +{{- if semverCompare ">= 1.13-0" .Capabilities.KubeVersion.GitVersion -}} +storage.k8s.io/v1 +{{- else -}} +storage.k8s.io/v1beta1 +{{- end -}} +{{- end -}} diff --git a/charts/gardener-extension-provider-ionos/templates/storageclass.yaml b/charts/gardener-extension-provider-ionos/templates/storageclass.yaml index 2f76c651..af0313da 100644 --- a/charts/gardener-extension-provider-ionos/templates/storageclass.yaml +++ b/charts/gardener-extension-provider-ionos/templates/storageclass.yaml @@ -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 }} diff --git a/charts/internal/shoot-storageclasses/templates/storageclasses.yaml b/charts/internal/shoot-storageclasses/templates/storageclasses.yaml index af73723a..b9edfcbb 100644 --- a/charts/internal/shoot-storageclasses/templates/storageclasses.yaml +++ b/charts/internal/shoot-storageclasses/templates/storageclasses.yaml @@ -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" . }} @@ -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