neondatabase / autoscaling

Postgres vertical autoscaling in k8s
Apache License 2.0
150 stars 20 forks source link

plugin: construct VmInfo from pod, not vm #865

Closed Omrigan closed 5 months ago

Omrigan commented 5 months ago

Simplify scheduler plugin so it no longer watches for VMs, avoiding issues for state synchronization.

Note for the review: can be reviewed per-commit.

Supersedes #853

Fixes #863

sharnoff commented 5 months ago

Nice. As it's currently implemented, I'm concerned that this will add dependence from neonvm onto the rest of autoscaling that previously didn't exist (i.e. before this PR, any amount of misuse of "autoscaling" [via annotations, labels, whatever] will not affect the VM other than autoscaling not working).

What do you think about separately exposing only the additional information that would be required to get api.VmInfo from the annotations? (note: various autoscaling settings will already be present, because labels & annotations are propagated from the VM -> pod) i.e. add annotation(s) with the data for spec CPUs and memory slots (and beyond that, I don't think there's anything else?)