Fix prometheus operator support (#3653)

This commit is contained in:
Marc Bachmann authored and GitHub committed 2021-10-05 12:35:57 -04:00
1 parent e329ffd52c
commit 851274d314
2 files changed
+28 -26

No files matched your search

@@ -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
});
}