Ingress and PersistentVolumeClaims metrics need to also be (#2443)

filtered and grouped by namespace, in addition to ingress.

Signed-off-by: Patrick J McNerthney <pat@mcnerthney.com>
This commit is contained in:
Patrick J. McNerthney authored and GitHub committed 2021-05-26 16:51:44 +03:00
1 parent 4daf7f6526
commit c9e0aa221a
5 files changed
+27 -27

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ import type { KubeJsonApiData } from "../kube-json-api";
export class IngressApi extends KubeApi<Ingress> {
getMetrics(ingress: string, namespace: string): Promise<IIngressMetrics> {
const opts = { category: "ingress", ingress };
const opts = { category: "ingress", ingress, namespace };
return metricsApi.getMetrics({
bytesSentSuccess: opts,
@@ -29,8 +29,8 @@ import type { KubeJsonApiData } from "../kube-json-api";
export class PersistentVolumeClaimsApi extends KubeApi<PersistentVolumeClaim> {
getMetrics(pvcName: string, namespace: string): Promise<IPvcMetrics> {
return metricsApi.getMetrics({
diskUsage: { category: "pvc", pvc: pvcName },
diskCapacity: { category: "pvc", pvc: pvcName }
diskUsage: { category: "pvc", pvc: pvcName, namespace },
diskCapacity: { category: "pvc", pvc: pvcName, namespace }
}, {
namespace
});