Skip to content

Commit

Permalink
Merge branch 'main' into del
Browse files Browse the repository at this point in the history
  • Loading branch information
AmaliMatharaarachchi authored Feb 29, 2024
2 parents dea72d4 + 3a6804d commit 5402f21
Show file tree
Hide file tree
Showing 21 changed files with 1,793 additions and 32 deletions.
46 changes: 43 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,23 @@ jobs:
--set idp.idpds.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/apk-idp-domain-service:${{ github.sha }} \
--set idp.idpui.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/apk-idp-ui:${{ github.sha }} \
--set wso2.apk.dp.ratelimiter.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/apk-ratelimiter:${{ github.sha }} \
--set wso2.apk.dp.gateway.httpListener.enabled=true
--set wso2.apk.dp.gateway.httpListener.enabled=true \
--set wso2.apk.dp.gatewayRuntime.deployment.router.configs.enableIntelligentRouting=true
kubectl get pods -n apk-integration-test
kubectl get svc -n apk-integration-test
- name: Archieve Logs
shell: sh
run: |
cd apk-repo
mkdir -p apk-repo/test/integration/podlogs
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=adapter -f > apk-repo/test/integration/podlogs/adapter.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=commoncontroller -f > apk-repo/test/integration/podlogs/common-controller.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=gateway -c enforcer -f > apk-repo/test/integration/podlogs/enforcer.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=gateway -c router -f > apk-repo/test/integration/podlogs/router.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=configdeployer-ds -f> apk-repo/test/integration/podlogs/config-deployer.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=idp-ds -f > apk-repo/test/integration/podlogs/idpds.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=idp-ui -f> apk-repo/test/integration/podlogs/idpui.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=ratelimiter -f> apk-repo/test/integration/podlogs/ratelimiter.log &
- name: Run test cases
shell: sh
run: |
Expand Down Expand Up @@ -214,7 +228,12 @@ jobs:
with:
report_paths: 'apk-repo/test/postman-tests/build/*.xml'
fail_on_test_failures: true

- name: Archieve Logs
if: always()
uses: actions/upload-artifact@v2
with:
name: apk-integration-test-go-logs
path: 'apk-repo/test/integration/podlogs/*.log'
runs_cucumber_integration_tests_on_pull_request:
if: github.event_name == 'pull_request_target' && contains(github.event.label.name, 'trigger-action')
needs: [build_adapter, build_common_controller, build_enforcer, build_router, build_config,build_idpds,build_idpui,build_ratelimiter]
Expand Down Expand Up @@ -283,9 +302,23 @@ jobs:
--set wso2.apk.dp.gatewayRuntime.deployment.router.readinessProbe.failureThreshold=10 \
--set idp.idpds.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/apk-idp-domain-service:${{ github.sha }} \
--set idp.idpui.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/apk-idp-ui:${{ github.sha }} \
--set wso2.apk.dp.ratelimiter.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/apk-ratelimiter:${{ github.sha }}
--set wso2.apk.dp.ratelimiter.deployment.image=${{ secrets.AZURE_ACR_NAME }}.azurecr.io/apk-ratelimiter:${{ github.sha }} \
--set wso2.apk.dp.gatewayRuntime.deployment.router.configs.enableIntelligentRouting=true
kubectl get pods -n apk-integration-test
kubectl get svc -n apk-integration-test
- name: Archieve Logs
shell: sh
run: |
cd apk-repo
mkdir -p apk-repo/test/integration/podlogs
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=adapter -f > apk-repo/test/integration/podlogs/adapter.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=commoncontroller -f > apk-repo/test/integration/podlogs/common-controller.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=gateway -c enforcer -f > apk-repo/test/integration/podlogs/enforcer.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=gateway -c router -f > apk-repo/test/integration/podlogs/router.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=configdeployer-ds -f> apk-repo/test/integration/podlogs/config-deployer.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=idp-ds -f > apk-repo/test/integration/podlogs/idpds.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=idp-ui -f> apk-repo/test/integration/podlogs/idpui.log &
kubectl logs -n apk-integration-test -l app.kubernetes.io/app=ratelimiter -f> apk-repo/test/integration/podlogs/ratelimiter.log &
- name: Run test cases
shell: sh
run: |
Expand Down Expand Up @@ -321,3 +354,10 @@ jobs:
with:
report_paths: 'apk-repo/test/cucumber-tests/build/test-output/junitreports/*.xml'
fail_on_test_failures: true
- name: Archieve Logs
if: always()
uses: actions/upload-artifact@v2
with:
name: apk-integration-test-cucmber-logs
path: 'apk-repo/test/integration/podlogs/*.log'

1 change: 1 addition & 0 deletions adapter/config/default_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ var defaultConfig = &Config{
CaCertFilePath: "/home/wso2/security/truststore/ratelimiter.crt",
SSLCertSANHostname: "",
},
EnableIntelligentRouting: false,
},
Enforcer: enforcer{
Management: management{
Expand Down
7 changes: 4 additions & 3 deletions adapter/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ type envoy struct {
Connection connection
PayloadPassingToEnforcer payloadPassingToEnforcer
// If configured true, router appends the immediate downstream ip address to the x-forward-for header
UseRemoteAddress bool
Filters filters
RateLimit rateLimit
UseRemoteAddress bool
Filters filters
RateLimit rateLimit
EnableIntelligentRouting bool
}

type connectionTimeouts struct {
Expand Down
Loading

0 comments on commit 5402f21

Please sign in to comment.