Skip to content

Commit

Permalink
fix: project report. AZSeparatedToplogy does not provide any az
Browse files Browse the repository at this point in the history
  • Loading branch information
VoigtS committed Dec 13, 2024
1 parent 6155bc1 commit cecf72d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/reports/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
return nil
}
if (reportInAny.Quota == nil || *reportInAny.Quota == 0) && reportInAny.Usage == 0 {
delete(resReport.PerAZ, limes.AvailabilityZoneAny)
}
Expand Down

0 comments on commit cecf72d

Please sign in to comment.