瀏覽代碼

Fix the issue with empty pod name on annotation metric.

Matt Bolt 5 年之前
父節點
當前提交
a11f49e83e
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      pkg/costmodel/metrics.go

+ 1 - 0
pkg/costmodel/metrics.go

@@ -404,6 +404,7 @@ type PodAnnotationsMetric struct {
 func newPodAnnotationMetric(namespace, name, fqname string, labelNames []string, labelValues []string) PodAnnotationsMetric {
 func newPodAnnotationMetric(namespace, name, fqname string, labelNames []string, labelValues []string) PodAnnotationsMetric {
 	return PodAnnotationsMetric{
 	return PodAnnotationsMetric{
 		namespace:   namespace,
 		namespace:   namespace,
+		name:        name,
 		fqName:      fqname,
 		fqName:      fqname,
 		labelNames:  labelNames,
 		labelNames:  labelNames,
 		labelValues: labelValues,
 		labelValues: labelValues,