瀏覽代碼

Reduce volume of this query, which can happen for storage classes of type "default"

Ajay Tripathy 5 年之前
父節點
當前提交
8166d804ba
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/costmodel/promparsers.go

+ 1 - 1
pkg/costmodel/promparsers.go

@@ -62,7 +62,7 @@ func GetPVInfo(qrs []*prom.QueryResult, defaultClusterID string) (map[string]*Pe
 		pvClass, err := val.GetString("storageclass")
 		pvClass, err := val.GetString("storageclass")
 		if err != nil {
 		if err != nil {
 			// TODO: We need to look up the actual PV and PV capacity. For now just proceed with "".
 			// TODO: We need to look up the actual PV and PV capacity. For now just proceed with "".
-			log.Warningf("Storage Class not found for claim \"%s/%s\".", ns, pvcName)
+			log.DedupedWarningf(5, "Storage Class not found for claim \"%s/%s\".", ns, pvcName)
 			pvClass = ""
 			pvClass = ""
 		}
 		}