瀏覽代碼

Revert "Deep Copy Labels (#3206) (#3208)" (#3214)

nik-kc 11 月之前
父節點
當前提交
e6a6f3af00
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      pkg/costmodel/costmodel.go

+ 1 - 2
pkg/costmodel/costmodel.go

@@ -3,7 +3,6 @@ package costmodel
 import (
 import (
 	"errors"
 	"errors"
 	"fmt"
 	"fmt"
-	"maps"
 	"math"
 	"math"
 	"regexp"
 	"regexp"
 	"strconv"
 	"strconv"
@@ -387,7 +386,7 @@ func (cm *CostModel) ComputeCostData(cli prometheusClient.Client, cp costAnalyze
 			ns := pod.Namespace
 			ns := pod.Namespace
 
 
 			nsLabels := namespaceLabelsMapping[ns+","+clusterID]
 			nsLabels := namespaceLabelsMapping[ns+","+clusterID]
-			podLabels := maps.Clone(pod.Labels)
+			podLabels := pod.Labels
 			if podLabels == nil {
 			if podLabels == nil {
 				podLabels = make(map[string]string)
 				podLabels = make(map[string]string)
 			}
 			}