From e06021f26691bcfe710dd3fb5797358d5f282377 Mon Sep 17 00:00:00 2001 From: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> Date: Mon, 4 Apr 2022 22:25:34 -0700 Subject: [PATCH] Fix bug in Tenant Monitoring Aggregating Usage from Tenant Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> --- pkg/controller/cluster/prometheus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controller/cluster/prometheus.go b/pkg/controller/cluster/prometheus.go index 8f15f9e4967..1a80450bde5 100644 --- a/pkg/controller/cluster/prometheus.go +++ b/pkg/controller/cluster/prometheus.go @@ -92,7 +92,7 @@ func getPrometheusMetricsForTenantWithRetry(tenant *miniov2.Tenant, bearer strin if err != nil { klog.Infof("%s/%s Could not parse usage for tenant: %s", tenant.Namespace, tenant.Name, line) } - promMetrics.Usage = int64(usage) + promMetrics.Usage = promMetrics.Usage + int64(usage) } } // Usable capacity