diff --git a/internal/reports/cluster.go b/internal/reports/cluster.go index 862f99ba..5c73e260 100644 --- a/internal/reports/cluster.go +++ b/internal/reports/cluster.go @@ -372,6 +372,11 @@ func GetClusterResources(cluster *core.Cluster, now time.Time, dbi db.Interface, // zero and there are other AZs if len(resource.PerAZ) >= 2 { capaInAny := resource.PerAZ[limes.AvailabilityZoneAny] + // TODO: implement a proper fix and create a test case + // AZSeparateToplogy does not contain ANY AZ. + if capaInAny == nil { + continue + } if capaInAny.Capacity == 0 && capaInAny.Usage == nil && capaInAny.ProjectsUsage == 0 { delete(resource.PerAZ, limes.AvailabilityZoneAny) } diff --git a/internal/reports/project.go b/internal/reports/project.go index 7edae111..55662d1a 100644 --- a/internal/reports/project.go +++ b/internal/reports/project.go @@ -401,6 +401,11 @@ func finalizeProjectResourceReport(projectReport *limesresources.ProjectReport, for _, resReport := range srvReport.Resources { if len(resReport.PerAZ) >= 2 { reportInAny := resReport.PerAZ[limes.AvailabilityZoneAny] + // TODO: implement a proper fix and isolate a test case + // AZSeparatedToplogy does not provide the any AZ. + if reportInAny == nil { + continue + } if (reportInAny.Quota == nil || *reportInAny.Quota == 0) && reportInAny.Usage == 0 { delete(resReport.PerAZ, limes.AvailabilityZoneAny) }