• Kubernetes Submit Queue's avatar
    Merge pull request #41113 from vmware/AddDatastoreParamForDynamicProvisioning · 3adc12c5
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Fix for Support selection of datastore for dynamic provisioning in vS…
    
    Fixes #40558
    
    Current vSphere Cloud provider doesn't allow a user to select a datastore for dynamic provisioning. All the volumes are created in default datastore provided by the user in the global vsphere configuration file.
    
    With this fix, the user will be able to provide the datastore in the storage class definition. This will allow the volumes to be created in the datastore specified by the user in the storage class definition. This field is optional. If no datastore is specified, the volume will be created in the default datastore specified in the global config file.
    
    For example:
    
    User creates a storage class with the datastore
    
    kind: StorageClass
    apiVersion: storage.k8s.io/v1beta1
    metadata:
    name: slow
    provisioner: kubernetes.io/vsphere-volume
    parameters:
    diskformat: thin
    datastore: VMFSDatastore
    Now the volume will be created in the datastore - "VMFSDatastore" specified by the user.
    
    If the user creates a storage class without any datastore
    
    kind: StorageClass
    apiVersion: storage.k8s.io/v1beta1
    metadata:
    name: slow
    provisioner: kubernetes.io/vsphere-volume
    parameters:
    diskformat: thin
    Now the volume will be created in the datastore which in the global configuration file (vsphere.conf)
    
    @pdhamdhere @kerneltime
    3adc12c5
Name
Last commit
Last update
..
bitbucket.org Loading commit data...
cloud.google.com/go Loading commit data...
github.com Loading commit data...
go4.org Loading commit data...
golang.org/x Loading commit data...
google.golang.org Loading commit data...
gopkg.in Loading commit data...
k8s.io Loading commit data...
BUILD Loading commit data...