Commit d9dc6422 authored by edisonxiang's avatar edisonxiang

using RoundUpToGB function directly

parent d80dbe7f
......@@ -81,9 +81,8 @@ func (gceutil *GCEDiskUtil) CreateVolume(c *gcePersistentDiskProvisioner) (strin
name := volume.GenerateVolumeName(c.options.ClusterName, c.options.PVName, 63) // GCE PD name can have up to 63 characters
capacity := c.options.PVC.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)]
requestBytes := capacity.Value()
// GCE PDs are allocated in chunks of GBs (not GiBs)
requestGB := volume.RoundUpSize(requestBytes, volume.GB)
requestGB := volume.RoundUpToGB(capacity)
// Apply Parameters (case-insensitive). We leave validation of
// the values to the cloud provider.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment