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

+ 2 - 1
costmodel/router.go

@@ -832,8 +832,9 @@ func Initialize() {
 			}
 		}
 	}
+	kubecostNamespace := os.Getenv("KUBECOST_NAMESPACE")
 	// We need an initial invocation because the init of the cache has happened before we had access to the provider.
-	configs, err := kubeClientset.CoreV1().ConfigMaps("kubecost").Get("pricing-configs", metav1.GetOptions{})
+	configs, err := kubeClientset.CoreV1().ConfigMaps(kubecostNamespace).Get("pricing-configs", metav1.GetOptions{})
 	if err != nil {
 		klog.Infof("ERROR FETCHING configmap: %s", err.Error())
 	}