From aabca03bedaca2199c90bc9868857510d1504fca Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Tue, 10 Dec 2024 15:17:05 +0100 Subject: [PATCH] limes: fix crash in topology validation of capacity-liquid (#622) --- internal/plugins/capacity_liquid.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/plugins/capacity_liquid.go b/internal/plugins/capacity_liquid.go index 76f60b65..a948cea3 100644 --- a/internal/plugins/capacity_liquid.go +++ b/internal/plugins/capacity_liquid.go @@ -119,6 +119,9 @@ func (p *liquidCapacityPlugin) Scrape(ctx context.Context, backchannel core.Capa resourceNames := SortedMapKeys(p.LiquidServiceInfo.Resources) var errs []error for _, resourceName := range resourceNames { + if !p.LiquidServiceInfo.Resources[resourceName].HasCapacity { + continue + } perAZ := resp.Resources[resourceName].PerAZ topology := p.LiquidServiceInfo.Resources[resourceName].Topology err := MatchLiquidReportToTopology(perAZ, topology)