2
0
Эх сурвалжийг харах

Initialize a Breakdown for ClusterDisks (missed one of the four possibilities for instantiating a new Disk)

Niko Kovacevic 5 жил өмнө
parent
commit
1372c7499d

+ 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)
 		key := fmt.Sprintf("%s/%s", cluster, name)
 		if _, ok := diskMap[key]; !ok {
 		if _, ok := diskMap[key]; !ok {
 			diskMap[key] = &Disk{
 			diskMap[key] = &Disk{
-				Cluster: cluster,
-				Name:    name,
-				Local:   true,
+				Cluster:   cluster,
+				Name:      name,
+				Breakdown: &ClusterCostsBreakdown{},
+				Local:     true,
 			}
 			}
 		}
 		}
 		diskMap[key].Bytes = bytes
 		diskMap[key].Bytes = bytes