You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if the user provides input for pvc creation in Kilobytes, Gigabytes, Megabytes (10^3, 10^6, 10^9) and the respective cloud provider creates the same in GB and returns response, it would be better if csi provisioner has the capability to convert the response published in pvc to GB accordingly. Elaborating more with an example
Cloud provider could created the volume in either Gibibytes (1024 * x), or Gigabytes (1000 *x) and send the response to csi provisioner accordingly.
Example: Current behavior
If the response sent by csi driver of the cloud provider is - 100000000000 bytes, currently the response published is - 97656250Ki which is derived from the code,
Rather than publishing unreadable value, it would better to figure out whether the response returned to csi provisioner from driver is in 1024 ^ x, or 1000 ^ x, accordingly use Binary or Decimal constants - https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#pkg-constants and publish the response so that correct value is seen in pvc. OR
Provide a parameter in CreateCSIVolumeResponse where the cloud provider can provide the units in which they want the response to be published which provides driver with more control.
Currently, if the user provides input for pvc creation in Kilobytes, Gigabytes, Megabytes (10^3, 10^6, 10^9) and the respective cloud provider creates the same in GB and returns response, it would be better if csi provisioner has the capability to convert the response published in pvc to GB accordingly. Elaborating more with an example
Cloud provider could created the volume in either Gibibytes (1024 * x), or Gigabytes (1000 *x) and send the response to csi provisioner accordingly.
Example:
Current behavior
If the response sent by csi driver of the cloud provider is - 100000000000 bytes, currently the response published is - 97656250Ki which is derived from the code,
external-provisioner/pkg/controller/controller.go
Line 1863 in ef83836
Expected and more readable response: 100G
OR
external-provisioner/pkg/controller/controller.go
Line 1863 in ef83836
Thank you!
The text was updated successfully, but these errors were encountered: