Przeglądaj źródła

1m offset and 0m are used interchangeably

Ajay Tripathy 5 lat temu
rodzic
commit
8e101c9029
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      pkg/costmodel/aggregation.go

+ 4 - 0
pkg/costmodel/aggregation.go

@@ -1717,6 +1717,10 @@ func GenerateAggKey(window kubecost.Window, field string, subfields []string, op
 	sort.Strings(subfields)
 	fieldStr := fmt.Sprintf("%s:%s", field, strings.Join(subfields, ","))
 
+	if offset == "1m" {
+		offset = ""
+	}
+
 	return fmt.Sprintf("%s:%s:%s:%s:%s:%s:%s:%t:%t:%t", duration, offset, filterStr, fieldStr, opts.Rate,
 		opts.SharedResources, opts.ShareSplit, opts.AllocateIdle, opts.IncludeTimeSeries,
 		opts.IncludeEfficiency)