Add Disk Usage to the VM ranking panel - #875
traviswu-bigstack wants to merge 2 commits into
Conversation
Adds a fourth VM ranking option: per-VM bytes allocated in the storage pool, served by the storageUsage metric type (cube-cos-api#663). Labelled "Disk Usage" rather than "Storage Usage" because it sits beside Cpu Usage and Memory Usage, where the user is picking a resource, not an API metric name. The SDK is regenerated from the spec submodule rather than hand-edited. The enum appears twice in the generated client -- GetMetricByHostOrVm and GetMetricByTypes -- and editing one of them by hand type-checks while leaving the other caller unable to name the value. Signed-off-by: Travis Wu <travis.wu@bigstack.co>
Build / Check are red for a pre-existing reason, not this changeBoth fail on 12 The cause is that this repo's spec submodule was pinned at I verified this is drift rather than anything in this PR: bumping the submodule to the spec's So it needs a separate fix — adding |
The mocks predate deviceProfile, so moving the spec submodule forward at all failed the build with twelve TS2741 errors in src/mocks/gpu.ts. Unrelated to the metric type this branch adds -- the same twelve appear on the spec's develop tip without it. Only a pgpu card names a Cyborg device profile; sriovVgpu and migBackedVgpu are scheduled through the PCI alias on each of their profiles, so those and unset cards are null. One of the three pgpu cards is left null as well, which is the documented state of a card whose profile has not been created yet or could not be looked up. Signed-off-by: Travis Wu <travis.wu@bigstack.co>
What type of PR is this?
/kind feature
What this PR does / why we need it
Adds a fourth option to the VM ranking panel on
/home/chart: Disk Usage, ranking VMs by bytes allocated in the storage pool. The card previously offered CPU, Memory and disk I/O, but nothing about how much space a VM actually occupies — the top-line ask from the customer request behind bigstack-oss/cubecos#1449.Labelled "Disk Usage" rather than "Storage Usage" because it sits beside "Cpu Usage" and "Memory Usage", where the user is picking a resource, not an API metric name.
Which issue(s) this PR fixes
Part of bigstack-oss/cubecos#1449. Needs bigstack-oss/cube-cos-api#663 (serves
storageUsage) and bigstack-oss/cube-cos-openapi#115 (the enum).Special notes for your reviewer
Additional documentation