소스 검색

Merge pull request #554 from kubecost/niko/cluster

ClusterDisks: fix missing initialization
Ajay Tripathy 6 년 전
부모
커밋
85eafb888a
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      pkg/costmodel/cluster.go

+ 4 - 3
pkg/costmodel/cluster.go

@@ -287,9 +287,10 @@ func ClusterDisks(client prometheus.Client, provider cloud.Provider, duration, o
 		key := fmt.Sprintf("%s/%s", cluster, name)
 		if _, ok := diskMap[key]; !ok {
 			diskMap[key] = &Disk{
-				Cluster: cluster,
-				Name:    name,
-				Local:   true,
+				Cluster:   cluster,
+				Name:      name,
+				Breakdown: &ClusterCostsBreakdown{},
+				Local:     true,
 			}
 		}
 		diskMap[key].Bytes = bytes