diff --git a/apim-apk-agent/README.md b/apim-apk-agent/README.md index 15f213cd..316589fb 100644 --- a/apim-apk-agent/README.md +++ b/apim-apk-agent/README.md @@ -11,4 +11,4 @@ 6. Execute `./gradlew build` to build the docker image 7. `cd` into cloned directory and then cd into `product-apim-tooling/helm-charts` 8. Run `helm install apim-apk-agent . -n apk` to deploy the agent in K8s - 9. Run `helm uninstall apim-apk-agent` to undeploy the agent in K8s \ No newline at end of file + 9. Run `helm uninstall apim-apk-agent -n apk` to undeploy the agent in K8s \ No newline at end of file diff --git a/apim-apk-agent/internal/eventhub/dataloader.go b/apim-apk-agent/internal/eventhub/dataloader.go index d8e1ec6d..0826c3c2 100644 --- a/apim-apk-agent/internal/eventhub/dataloader.go +++ b/apim-apk-agent/internal/eventhub/dataloader.go @@ -319,7 +319,8 @@ func FetchAPIsOnStartUp(conf *config.Config, apiUUIDList []string) { loggers.Info("API file found: " + file.Name) // Todo: } - health.SetControlPlaneRestAPIStatus(err == nil) + logger.LoggerMsg.Info("Err", err) + //health.SetControlPlaneRestAPIStatus(err == nil) } else if data.ErrorCode == 204 { logger.LoggerMsg.Infof("No API Artifacts are available in the control plane for the envionments :%s", diff --git a/apim-apk-agent/internal/synchronizer/keymanagers_fetcher.go b/apim-apk-agent/internal/synchronizer/keymanagers_fetcher.go index ecaf17be..75139aef 100644 --- a/apim-apk-agent/internal/synchronizer/keymanagers_fetcher.go +++ b/apim-apk-agent/internal/synchronizer/keymanagers_fetcher.go @@ -32,7 +32,6 @@ import ( "time" "github.com/wso2/product-apim-tooling/apim-apk-agent/config" - "github.com/wso2/product-apim-tooling/apim-apk-agent/internal/common" eventhubInternal "github.com/wso2/product-apim-tooling/apim-apk-agent/internal/eventhub" pkgAuth "github.com/wso2/product-apim-tooling/apim-apk-agent/pkg/auth" eventhubTypes "github.com/wso2/product-apim-tooling/apim-apk-agent/pkg/eventhub/types" @@ -85,7 +84,6 @@ func FetchKeyManagersOnStartUp(conf *config.Config) { } var queryParamMap map[string]string - queryParamMap = common.PopulateQueryParamForOrganizationID(queryParamMap) if queryParamMap != nil && len(queryParamMap) > 0 { q := req.URL.Query() @@ -98,6 +96,8 @@ func FetchKeyManagersOnStartUp(conf *config.Config) { // Setting authorization header req.Header.Set(sync.Authorization, basicAuth) + req.Header.Set("x-wso2-tenant", "ALL") + // Make the request logger.LoggerSync.Debug("Sending the control plane request") resp, err := tlsutils.InvokeControlPlane(req, skipSSL)