ods-core
ods-core copied to clipboard
why we need define storage-provisioner on persistentVolumeClaim
Describe the Question
I want to discuss why the storage-provisioner has to be configurable, as defined in pvc.yml:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.beta.kubernetes.io/storage-class: ${STORAGE_CLASS_DATA}
volume.beta.kubernetes.io/storage-provisioner: ${STORAGE_PROVISIONER}
The provisioner can be defined in the storage-class, that is referenced by the annotation volume.beta.kubernetes.io/storage-class
For example, a storage-class for local-storage can be defined:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: local-storage
annotations:
storageclass.kubernetes.io/is-default-class: 'true'
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Delete
For some background on this, see #22.
However, I did not know about StorageClass, so maybe this is a better solution to the problem. I am definitely open for a change.
Could you explain a little what issues you have with the current approach or which downsides you see with it?