mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
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: Harsh 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 ```
This commit is contained in:
commit
f04218071f
@ -71,8 +71,13 @@ func (util *PortworxVolumeUtil) CreateVolume(p *portworxVolumeProvisioner) (stri
|
||||
spec = specHandler.DefaultSpec()
|
||||
}
|
||||
|
||||
// Pass all parameters as volume labels for Portworx server-side processing.
|
||||
spec.VolumeLabels = p.options.Parameters
|
||||
// Pass all parameters as volume labels for Portworx server-side processing
|
||||
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
|
||||
spec.Size = uint64(requestGiB * volutil.GIB)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user