Pass whole PVC to provisioner plugin
Gluster provisioner is interested in pvc.Namespace and I don't want to add at as a new field in VolumeOptions - it would contain almost whole PVC. Let's pass direct reference to PVC instead and let the provisioner to pick information it is interested in.
This commit is contained in:
@@ -314,7 +314,8 @@ func (util *RBDUtil) DetachDisk(c rbdUnmounter, mntPath string) error {
|
||||
}
|
||||
|
||||
func (util *RBDUtil) CreateImage(p *rbdVolumeProvisioner) (r *api.RBDVolumeSource, size int, err error) {
|
||||
volSizeBytes := p.options.Capacity.Value()
|
||||
capacity := p.options.PVC.Spec.Resources.Requests[api.ResourceName(api.ResourceStorage)]
|
||||
volSizeBytes := capacity.Value()
|
||||
// convert to MB that rbd defaults on
|
||||
sz := int(volume.RoundUpSize(volSizeBytes, 1024*1024))
|
||||
volSz := fmt.Sprintf("%d", sz)
|
||||
|
||||
Reference in New Issue
Block a user