Răsfoiți Sursa

Merge pull request #554 from kubecost/niko/cluster

ClusterDisks: fix missing initialization
Ajay Tripathy 5 ani în urmă
părinte
comite
85eafb888a
1 a modificat fișierele cu 4 adăugiri și 3 ștergeri
  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