Ajay Tripathy 1 рік тому
батько
коміт
709cebeb76
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      pkg/resourcequota/resourcequota.go

+ 3 - 0
pkg/resourcequota/resourcequota.go

@@ -52,6 +52,9 @@ func (qt *QuotaTracker) GetAllQuotaMetrics() (map[string]map[string][]QuotaMetri
 			log.Errorf("Warning: failed to get quota metrics for namespace %s: %v\n", ns.Name, err)
 			continue
 		}
+		if allMetrics[env.GetClusterID()] == nil {
+			allMetrics[env.GetClusterID()] = make(map[string][]QuotaMetrics)
+		}
 		allMetrics[env.GetClusterID()][ns.Name] = metrics
 	}
 	return allMetrics, nil