Sfoglia il codice sorgente

fix asset query duration

Signed-off-by: Alex Meijer <ameijer@kubecost.com>
Alex Meijer 2 anni fa
parent
commit
76d292ff99
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      pkg/costmodel/cluster.go

+ 1 - 1
pkg/costmodel/cluster.go

@@ -561,7 +561,7 @@ func ClusterNodes(cp models.Provider, client prometheus.Client, start, end time.
 		log.DedupedWarningf(3, "ClusterNodes(): Configured ETL resolution (%d seconds) is below the 60 seconds threshold. Overriding with 1 minute.", int(resolution.Seconds()))
 	}
 
-	durStr := timeutil.DurationString(resolution)
+	durStr := timeutil.DurationString(end.Sub(start))
 	if durStr == "" {
 		return nil, fmt.Errorf("illegal duration value for %s", kubecost.NewClosedWindow(start, end))
 	}