Fix memory requests/limits value
giorgosdi opened this issue · comments
Giorgos Christos Dimitriou commented
The current value that get returned from the functions :
container.Resources.Requests/Limits.Memory().Value()
returns and Int64 which is an unscaled value rounded up to the nearest integer away from 0. godoc
The current solution is off by ~100Mi when in come to Gi of memory and it was noticed that it started happen around 4000Mi
The ScaledValue() doesnt really work as it misses the correct amount by ~5% in all memory metrics
kubectl
uses converResourceMemoryToString to standardise the metrics