Trying out this approach as a potential way to make implementing overcommit (#517) easier, to avoid dealing with rounding errors when responding to the autoscaler-agents.
I think this "speculative reserve" may be a reasonable change in isolation, and reducing the number of separate implementations of the same logic should also help with overcommit (because of how it affects every single resource calculation).
Not 100% sure we want to go this route, but it's my best guess so far.
Tested this locally and it seemed to be ok; already fixed a couple bugs based on suspicious logs. There might be more.
Trying out this approach as a potential way to make implementing overcommit (#517) easier, to avoid dealing with rounding errors when responding to the autoscaler-agents.
I think this "speculative reserve" may be a reasonable change in isolation, and reducing the number of separate implementations of the same logic should also help with overcommit (because of how it affects every single resource calculation).
Not 100% sure we want to go this route, but it's my best guess so far.
Tested this locally and it seemed to be ok; already fixed a couple bugs based on suspicious logs. There might be more.