Skip to content

Commit

Permalink
Merge pull request #3633 from renuka-fernando/rl-update
Browse files Browse the repository at this point in the history
Update Rate Limiter Image to Configure XDS_CLIENT_MAX_MSG_SIZE_IN_BYTES
  • Loading branch information
renuka-fernando authored Jan 7, 2025
2 parents 129d843 + 0be2a2a commit 8798db2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ func TestCreateRouteClusterSpecifier(t *testing.T) {

// Test the same scenario with endpointBasePath as empty string and API Resource with root slash
// If endpointBasepath is empty enforce the path to be "/" to avoid setting empty path to upstream.
// https://dev-us-east-azure/dlif/request-info/v1.0 -> https://bachendhost/
// https://dev-us-east-azure/dlif/request-info/v1.0/ -> https://bachendhost/
// https://dev-us-east-azure/dlif/request-info/v1.0 -> https://backendhost/
// https://dev-us-east-azure/dlif/request-info/v1.0/ -> https://backendhost/
routeWithRootSlash := createRoute(generateRouteCreateParamsForUnitTests(title, apiType, vHost, xWso2BasePath, version, "",
"/", resourceWithGet.GetMethodList(), prodClusterName, nil, false))
assert.NotNil(t, routeWithRootSlash, "Route should not be null")
Expand All @@ -342,8 +342,8 @@ func TestCreateRouteClusterSpecifier(t *testing.T) {

// if endpointBasepath is not empty, enforce the path to be the endpointBasepath and allow the downnstream to handle trailing slash.
// if downstream sends the trailing slash, send the trailing slash to the upstream otherwise send the path without the trailing slash.
// https://dev-us-east-azure/dlif/request-info/v1.0 -> https://bachendhost/context
// https://dev-us-east-azure/dlif/request-info/v1.0/ -> https://bachendhost/context/
// https://dev-us-east-azure/dlif/request-info/v1.0 -> https://backendhost/context
// https://dev-us-east-azure/dlif/request-info/v1.0/ -> https://backendhost/context/
routeWithRootSlashNonEmptyEp := createRoute(generateRouteCreateParamsForUnitTests(title, apiType, vHost, xWso2BasePath, version, "/foo",
"/", resourceWithGet.GetMethodList(), prodClusterName, nil, false))
assert.NotNil(t, routeWithRootSlashNonEmptyEp, "Route should not be null")
Expand Down
8 changes: 4 additions & 4 deletions adapter/internal/oasparser/envoyconf/routes_with_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -952,15 +952,15 @@ func createRoute(params *routeCreateParams) *routev3.Route {
// Hence doing the special logic here.
if endpointBasepath == "" {
// If endpointBasepath is empty enforce the path to be "/" to avoid setting empty path to upstream.
// https://dev-us-east-azure/dlif/request-info/v1.0 -> https://bachendhost/
// https://dev-us-east-azure/dlif/request-info/v1.0/ -> https://bachendhost/
// https://dev-us-east-azure/dlif/request-info/v1.0 -> https://backendhost/
// https://dev-us-east-azure/dlif/request-info/v1.0/ -> https://backendhost/
resourceRegex = "/?"
substitutionString = "/"
} else {
// if endpointBasepath is not empty, enforce the path to be the endpointBasepath and allow the downnstream to handle trailing slash.
// if downstream sends the trailing slash, send the trailing slash to the upstream otherwise send the path without the trailing slash.
// https://dev-us-east-azure/dlif/request-info/v1.0 -> https://bachendhost/context
// https://dev-us-east-azure/dlif/request-info/v1.0/ -> https://bachendhost/context/
// https://dev-us-east-azure/dlif/request-info/v1.0 -> https://backendhost/context
// https://dev-us-east-azure/dlif/request-info/v1.0/ -> https://backendhost/context/
resourceRegex = ""
substitutionString = endpointBasepath
}
Expand Down
2 changes: 1 addition & 1 deletion enforcer-parent/enforcer/src/main/resources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
# -----------------------------------------------------------------------

FROM adoptopenjdk/openjdk11:jre-11.0.23_9-alpine
FROM adoptopenjdk/openjdk11:jre-11.0.25_9-alpine
LABEL maintainer="WSO2 Docker Maintainers <wso2.com>"

RUN apk update && apk upgrade --no-cache
Expand Down
4 changes: 3 additions & 1 deletion rate-limiter/src/main/resources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
# -----------------------------------------------------------------------

FROM envoyproxy/ratelimit:19f2079f
FROM envoyproxy/ratelimit:87adad26
LABEL maintainer="WSO2 Docker Maintainers <wso2.com>"

RUN apk update && apk upgrade --no-cache
Expand Down Expand Up @@ -45,6 +45,8 @@ ENV CONFIG_GRPC_XDS_CLIENT_TLS_KEY=/home/wso2/security/keystore/rate-limiter.key
ENV CONFIG_GRPC_XDS_CLIENT_TLS_CERT=/home/wso2/security/keystore/rate-limiter.pem
ENV CONFIG_GRPC_XDS_SERVER_TLS_CACERT=/home/wso2/security/truststore/mg.pem

ENV XDS_CLIENT_MAX_MSG_SIZE_IN_BYTES=41943040

ARG MOTD="\n\
Welcome to WSO2 Docker Resources \n\
--------------------------------- \n\
Expand Down

0 comments on commit 8798db2

Please sign in to comment.