1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix PVC metric support

Signed-off-by: Marc Bachmann <marc.brookman@gmail.com>
This commit is contained in:
Marc Bachmann 2021-10-05 01:04:25 +02:00
parent 4b13e30227
commit 760fde4559
No known key found for this signature in database
GPG Key ID: 001884E1441067E1

View File

@ -31,11 +31,13 @@ export class PersistentVolumeClaimsApi extends KubeApi<PersistentVolumeClaim> {
}
export function getMetricsForPvc(pvc: PersistentVolumeClaim): Promise<IPvcMetrics> {
const opts = { category: "pvc", pvc: pvc.getName(), namespace: pvc.getNs() };
return metricsApi.getMetrics({
diskUsage: { category: "pvc", pvc: pvc.getName() },
diskCapacity: { category: "pvc", pvc: pvc.getName() }
diskUsage: opts,
diskCapacity: opts
}, {
namespace: pvc.getNs()
namespace: opts.namespace
});
}