AjayTripathy 6 лет назад
Родитель
Сommit
a2bbfbabb4
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      costmodel/costmodel.go

+ 1 - 0
costmodel/costmodel.go

@@ -663,6 +663,7 @@ func findDeletedPodInfo(cli prometheusClient.Client, missingContainers map[strin
 			labels, ok := podLabels[cm.PodName]
 			labels, ok := podLabels[cm.PodName]
 			if !ok {
 			if !ok {
 				klog.V(1).Infof("Unable to find historical data for pod '%s'", cm.PodName)
 				klog.V(1).Infof("Unable to find historical data for pod '%s'", cm.PodName)
+				labels = make(map[string]string)
 			}
 			}
 			for k, v := range costData.NamespaceLabels {
 			for k, v := range costData.NamespaceLabels {
 				if _, ok := labels[k]; !ok {
 				if _, ok := labels[k]; !ok {