mirror of https://github.com/k3s-io/k3s
Merge pull request #76960 from harsh-px/automated-cherry-pick-of-#76341-upstream-release-1.14
Automated cherry pick of #76341: Fix concurrent map access in Portworx create volume callpull/564/head
commit
3a208b6893
|
@ -72,12 +72,14 @@ func (util *portworxVolumeUtil) CreateVolume(p *portworxVolumeProvisioner) (stri
|
|||
}
|
||||
|
||||
// Pass all parameters as volume labels for Portworx server-side processing
|
||||
if len(p.options.Parameters) > 0 {
|
||||
spec.VolumeLabels = p.options.Parameters
|
||||
} else {
|
||||
if spec.VolumeLabels == nil {
|
||||
spec.VolumeLabels = make(map[string]string, 0)
|
||||
}
|
||||
|
||||
for k, v := range p.options.Parameters {
|
||||
spec.VolumeLabels[k] = v
|
||||
}
|
||||
|
||||
// Update the requested size in the spec
|
||||
spec.Size = uint64(requestGiB * volumehelpers.GiB)
|
||||
|
||||
|
|
Loading…
Reference in New Issue