Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configurable storage class #136

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Make default storage class configurable.

## [1.10.0] - 2024-07-08

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,16 @@ apiVersion: storage.k8s.io/v1
metadata:
labels:
{{- include "labels.common" $ | nindent 4 }}
{{- if .delete.isDefault }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
name: csi-vsphere-sc-delete
name: csi-vsphere-sc-default
provisioner: csi.vsphere.vmware.com
reclaimPolicy: Delete
reclaimPolicy: {{ .reclaimPolicy }}
allowVolumeExpansion: true
parameters:
storagepolicyname: {{ .delete.vcdStorageProfileName | quote }}
csi.storage.k8s.io/fstype: {{ .delete.fileSystem }}
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
labels:
{{- include "labels.common" $ | nindent 4 }}
{{- if .retain.isDefault }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- if .storageProfileName }}
storagepolicyname: {{ .storageProfileName | quote }}
{{- end }}
name: csi-vsphere-sc-retain
provisioner: csi.vsphere.vmware.com
reclaimPolicy: Retain
allowVolumeExpansion: true
parameters:
storagepolicyname: {{ .retain.vcdStorageProfileName | quote }}
csi.storage.k8s.io/fstype: {{ .retain.fileSystem }}
csi.storage.k8s.io/fstype: {{ .fileSystem }}
{{- end }}
{{- end }}
11 changes: 3 additions & 8 deletions config/vsphere-csi-driver/overwrites/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ config:

storageClass:
enabled: true
delete:
isDefault: true
vcdStorageProfileName: "vSAN Default Storage Policy"
fileSystem: "ext4"
retain:
isDefault: false
vcdStorageProfileName: "vSAN Default Storage Policy"
fileSystem: "ext4"
reclaimPolicy: "Delete"
fileSystem: "ext4"
# storageProfileName: "vSAN Default Storage Policy"

internalFeatureStates:
topologyPreferentialDatastores:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,16 @@ apiVersion: storage.k8s.io/v1
metadata:
labels:
{{- include "labels.common" $ | nindent 4 }}
{{- if .delete.isDefault }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
name: csi-vsphere-sc-delete
name: csi-vsphere-sc-default
provisioner: csi.vsphere.vmware.com
reclaimPolicy: Delete
reclaimPolicy: {{ .reclaimPolicy }}
allowVolumeExpansion: true
parameters:
storagepolicyname: {{ .delete.vcdStorageProfileName | quote }}
csi.storage.k8s.io/fstype: {{ .delete.fileSystem }}
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
labels:
{{- include "labels.common" $ | nindent 4 }}
{{- if .retain.isDefault }}
annotations:
storageclass.kubernetes.io/is-default-class: "true"
{{- if .storageProfileName }}
storagepolicyname: {{ .storageProfileName | quote }}
{{- end }}
name: csi-vsphere-sc-retain
provisioner: csi.vsphere.vmware.com
reclaimPolicy: Retain
allowVolumeExpansion: true
parameters:
storagepolicyname: {{ .retain.vcdStorageProfileName | quote }}
csi.storage.k8s.io/fstype: {{ .retain.fileSystem }}
csi.storage.k8s.io/fstype: {{ .fileSystem }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ config:

storageClass:
enabled: true
delete:
isDefault: true
vcdStorageProfileName: "vSAN Default Storage Policy"
fileSystem: "ext4"
retain:
isDefault: false
vcdStorageProfileName: "vSAN Default Storage Policy"
fileSystem: "ext4"
reclaimPolicy: "Delete"
fileSystem: "ext4"
# storageProfileName: "vSAN Default Storage Policy"

internalFeatureStates:
topologyPreferentialDatastores:
Expand Down