mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 10:19:50 +00:00
In case storage class parameters are empty, create a new map for Portworx volume labels
Fixes #64894 Signed-off-by: Harsh Desai <harsh@portworx.com>
This commit is contained in:
parent
16921ae7a8
commit
b5234d33dd
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user