Skip to content

Commit

Permalink
Merge pull request #1042 from CrowleyRajapakse/master
Browse files Browse the repository at this point in the history
Fixing several issues
  • Loading branch information
CrowleyRajapakse authored Jan 12, 2024
2 parents d567406 + 35009fe commit 62217c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apim-apk-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
9. Run `helm uninstall apim-apk-agent -n apk` to undeploy the agent in K8s
3 changes: 2 additions & 1 deletion apim-apk-agent/internal/eventhub/dataloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions apim-apk-agent/internal/synchronizer/keymanagers_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit 62217c4

Please sign in to comment.