• 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
..
aws_ebs Loading commit data...
azure_dd Loading commit data...
azure_file Loading commit data...
cephfs Loading commit data...
cinder Loading commit data...
configmap Loading commit data...
downwardapi Loading commit data...
empty_dir Loading commit data...
fc Loading commit data...
flexvolume Loading commit data...
flocker Loading commit data...
gce_pd Loading commit data...
git_repo Loading commit data...
glusterfs Loading commit data...
host_path Loading commit data...
iscsi Loading commit data...
nfs Loading commit data...
photon_pd Loading commit data...
projected Loading commit data...
quobyte Loading commit data...
rbd Loading commit data...
secret Loading commit data...
testing Loading commit data...
util Loading commit data...
vsphere_volume Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
doc.go Loading commit data...
metrics_cached.go Loading commit data...
metrics_du.go Loading commit data...
metrics_du_test.go Loading commit data...
metrics_errors.go Loading commit data...
metrics_nil.go Loading commit data...
metrics_nil_test.go Loading commit data...
metrics_statfs.go Loading commit data...
metrics_statfs_test.go Loading commit data...
plugins.go Loading commit data...
plugins_test.go Loading commit data...
util.go Loading commit data...
util_test.go Loading commit data...
volume.go Loading commit data...
volume_linux.go Loading commit data...
volume_unsupported.go Loading commit data...