Explorar o código

KCM-4123 - InstallInfo Null (#3186) (#3189)

Signed-off-by: Nik Willwerth <nwillwerth@kubecost.com>
nik-kc hai 1 ano
pai
achega
c906bd03f8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pkg/costmodel/router.go

+ 1 - 1
pkg/costmodel/router.go

@@ -1059,7 +1059,7 @@ func GetKubecostContainers(kubeClientSet kubernetes.Interface) ([]ContainerInfo,
 
 	// If we have zero pods either something is weird with the install since the app selector is not exposed in the helm
 	// chart or more likely we are running locally - in either case Images field will return as null
-	var containers []ContainerInfo
+	containers := make([]ContainerInfo, 0)
 	if len(pods.Items) > 0 {
 		for _, pod := range pods.Items {
 			for _, container := range pod.Spec.Containers {