Unverified Commit f0421807 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #64895 from harsh-px/64894

Automatic merge from submit-queue (batch tested with PRs 64895, 64938, 63700, 65050, 64957). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. In case storage class parameters are empty, create a new map for Portworx volume labels Signed-off-by: 's avatarHarsh Desai <harsh@portworx.com> **What this PR does / why we need it**: Fixes #64894 **Release note**: ```release-note Fixes an issue where Portworx PVCs remain in pending state when created using a StorageClass with empty parameters ```
parents 83ad4d9e b5234d33
...@@ -71,8 +71,13 @@ func (util *PortworxVolumeUtil) CreateVolume(p *portworxVolumeProvisioner) (stri ...@@ -71,8 +71,13 @@ func (util *PortworxVolumeUtil) CreateVolume(p *portworxVolumeProvisioner) (stri
spec = specHandler.DefaultSpec() spec = specHandler.DefaultSpec()
} }
// Pass all parameters as volume labels for Portworx server-side processing. // Pass all parameters as volume labels for Portworx server-side processing
spec.VolumeLabels = p.options.Parameters if len(p.options.Parameters) > 0 {
spec.VolumeLabels = p.options.Parameters
} else {
spec.VolumeLabels = make(map[string]string, 0)
}
// Update the requested size in the spec // Update the requested size in the spec
spec.Size = uint64(requestGiB * volutil.GIB) spec.Size = uint64(requestGiB * volutil.GIB)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment