support default storageclass
willzhang opened this issue · comments
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
support config default storageclass in helm charts
root@node33:~# kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
mayastor-single-replica (default) io.openebs.csi-mayastor Delete Immediate false 16m
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ .Release.Name }}-single-replica
annotations:
storageclass.kubernetes.io/is-default-class: {{ .Values.persistence.defaultClass | quote }}
parameters:
repl: '1'
protocol: 'nvmf'
ioTimeout: '60'
provisioner: io.openebs.csi-mayastor
Hi @willzhang, what are you asking exactly, for us to add some storage classes to helm?
So far, we've refrained from doing so to let users add SC's with whichever parameters they want. Is this worth revisiting @avishnu?
I want helm chart values.yaml to have a parameter: .persistence.defaultClass=true or false
, which supports setting mayastor's storageclass as the default storageclass.
I stand corrected, we do have one SC: https://github.com/openebs/mayastor-extensions/blob/develop/chart/templates/storageclass.yaml
Hi @willzhang , the storage class that we provide in the helm is a sample that a user could refer to, and build upon.
What is the use-case for making it the cluster default?
When the mayastor backend storage is ready, the application can be automatically installed without the need to manually specify which storage to use for the application.
The default storage class we have on helm is for 1-replica volumes only, so there's no mirroring. If we want to configure it you can apply a SC yourself or parametrize the chart's storage class.
If you're interested and willing we'd be happy to take a PR for this: https://github.com/openebs/mayastor-extensions/blob/develop/CONTRIBUTING.md#modifying-the-helm-chart