Ajay Tripathy 1 год назад
Родитель
Сommit
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