2
0
Ajay Tripathy 5 жил өмнө
parent
commit
c950399dec

+ 3 - 3
pkg/cloud/awsprovider.go

@@ -514,7 +514,7 @@ func (aws *AWS) DownloadPricingData() error {
 	aws.DownloadPricingDataLock.Lock()
 	aws.DownloadPricingDataLock.Lock()
 	defer aws.DownloadPricingDataLock.Unlock()
 	defer aws.DownloadPricingDataLock.Unlock()
 	if aws.ServiceAccountChecks == nil {
 	if aws.ServiceAccountChecks == nil {
-		aws.ServiceAccountChecks = []*ServiceAccountCheck{}
+		aws.ServiceAccountChecks = make(map[string]*ServiceAccountCheck)
 	}
 	}
 	c, err := aws.Config.GetCustomPricingData()
 	c, err := aws.Config.GetCustomPricingData()
 	if err != nil {
 	if err != nil {
@@ -1891,8 +1891,8 @@ func (a *AWS) parseSpotData(bucket string, prefix string, projectID string, regi
 		}
 		}
 		return nil, err
 		return nil, err
 	} else {
 	} else {
-		a.ServiceAccountChecks["objectList"] = &ServiceAccountCheck{
-			Message: "Object Get Permissions Available",
+		a.ServiceAccountChecks["bucketList"] = &ServiceAccountCheck{
+			Message: "Bucket List Permissions Available",
 			Status:  true,
 			Status:  true,
 		}
 		}
 	}
 	}

+ 3 - 2
pkg/costmodel/router.go

@@ -647,7 +647,8 @@ func (p *Accesses) ClusterInfo(w http.ResponseWriter, r *http.Request, ps httpro
 func (p *Accesses) GetServiceAccountStatus(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
 func (p *Accesses) GetServiceAccountStatus(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
 	w.Header().Set("Content-Type", "application/json")
 	w.Header().Set("Content-Type", "application/json")
 	w.Header().Set("Access-Control-Allow-Origin", "*")
 	w.Header().Set("Access-Control-Allow-Origin", "*")
-	w.Write(WrapData(A.Cloud.ServiceAccountStatus()))
+
+	w.Write(WrapData(A.Cloud.ServiceAccountStatus(), nil))
 }
 }
 
 
 func (p *Accesses) GetPrometheusMetadata(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
 func (p *Accesses) GetPrometheusMetadata(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
@@ -1243,7 +1244,7 @@ func Initialize(additionalConfigWatchers ...ConfigWatchers) {
 	Router.GET("/managementPlatform", A.ManagementPlatform)
 	Router.GET("/managementPlatform", A.ManagementPlatform)
 	Router.GET("/clusterInfo", A.ClusterInfo)
 	Router.GET("/clusterInfo", A.ClusterInfo)
 	Router.GET("/clusters", managerEndpoints.GetAllClusters)
 	Router.GET("/clusters", managerEndpoints.GetAllClusters)
-	Router.GET("/serviceAccountStatus", A.)
+	Router.GET("/serviceAccountStatus", A.GetServiceAccountStatus)
 	Router.PUT("/clusters", managerEndpoints.PutCluster)
 	Router.PUT("/clusters", managerEndpoints.PutCluster)
 	Router.DELETE("/clusters/:id", managerEndpoints.DeleteCluster)
 	Router.DELETE("/clusters/:id", managerEndpoints.DeleteCluster)
 }
 }