neondatabase / autoscaling

Postgres vertical autoscaling in k8s
Apache License 2.0
142 stars 16 forks source link

neonvm-controller: Emit CpuInfo/MemoryInfo every reconcile #974

Closed sharnoff closed 2 weeks ago

sharnoff commented 2 weeks ago

Extracted from #970.

Currently, when leaving the Scaling phase, we emit events like

MemoryInfo  VirtualMachine vm-foo uses 4GiB memory
CpuInfo     VirtualMachine vm-foo uses 1 cpu cores

To provide more up-to-date information in the event log, we can emit these events every time .status.{cpus,memorySize} changes.

This is relevant for #970 because with virtio-mem, the current state of the memory is performed asychronously and so otherwise wouldn't be available in the logs.