mirror of https://github.com/k3s-io/k3s
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>pull/8/head
parent
16921ae7a8
commit
b5234d33dd
|
@ -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