acorn-io / runtime

A simple application deployment framework built on Kubernetes
https://docs.acorn.io/
Apache License 2.0
1.14k stars 101 forks source link

ComputeClass request downscaling for overprovisioning (#2381) #2394

Closed keyallis closed 6 months ago

keyallis commented 6 months ago

2381

Add support for scaling down memory requests for acorns in relation to memory limits. We handle ComputeClasses that do not have this field set (ie legacy ComputeClasses) as having a 1:1 mapping. This means all existing tests should continue to work and behave as expected, so all new tests are only used to cover the new field itself.

Checklist

g-linville commented 6 months ago

I'm just now starting to look at the code, but one thing I am noticing is that scalar needs to be replaced with scaler everywhere it appears. We're calling it a "scaler" because it determines the scale of the memory request in comparison to the limit. Mathematically speaking it is also a "scalar" since it is a single numerical value and not a vector, but that is not what we should name it lol.