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

Merge pull request #65590 from harsh-px/automated-cherry-pick-of-#64895-upstream-release-1.10

Automatic merge from submit-queue. Automated cherry pick of #64895: In case storage class parameters are empty, create a new map Cherry pick of #64895 on release-1.10. #64895: In case storage class parameters are empty, create a new map
parents 6a6fa9e6 22580c50
...@@ -68,8 +68,13 @@ func (util *PortworxVolumeUtil) CreateVolume(p *portworxVolumeProvisioner) (stri ...@@ -68,8 +68,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(requestGB * 1024 * 1024 * 1024) spec.Size = uint64(requestGB * 1024 * 1024 * 1024)
// Change the Portworx Volume name to PV name // Change the Portworx Volume name to PV name
......
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