vmware-archive / kubernetes-archived

This repository is archived. Please file in-tree vSphere Cloud Provider issues at https://github.com/kubernetes/kubernetes/issues . CSI Driver for vSphere is available at https://github.com/kubernetes/cloud-provider-vsphere
Apache License 2.0
46 stars 31 forks source link

Add SDRS support for vSphere Cloud Provider #203

Open divyenpatel opened 7 years ago

divyenpatel commented 7 years ago

At present user can dynamically provision volumes on clustered datastore with specifying datastore name in the storage class.

For example,

kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: test-cluster
provisioner: kubernetes.io/vsphere-volume
parameters:
  diskformat: thin
  datastore: "DatastoreCluster/vsanDatastore"

Here, "DatastoreCluster/vsanDatastore" specifies vsanDatastore is the datastore on DatastoreCluster.

And here's the corresponding PVC:

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: pvcsc002
  annotations:
    volume.beta.kubernetes.io/storage-class: test-cluster
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 2Gi

Alternatively the following storage class definition also works

kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: test-cluster
provisioner: kubernetes.io/vsphere-volume
parameters:
  diskformat: thin
  datastore: "vsanDatastore"

By directly specifying the datastore instead of the full datastore path.

But, few customers has asked to add support for provision volume based on space utilization and load balancing on available datastore from the datastore cluster, without specifying the datastore name in the storage class.

For example,

kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: test-cluster
provisioner: kubernetes.io/vsphere-volume
parameters:
  diskformat: thin
  datastore: "DatastoreCluster"
jinglejengel commented 6 years ago

+1 !

daur88 commented 5 years ago

+1