Skip to content

Commit 48b5260

Browse files
Mechanical edits.
1 parent b8cc327 commit 48b5260

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

articles/spring-apps/migration/migrate-to-azure-container-apps-components-gateway.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Migrate Spring Cloud Gateway for Tanzu to Managed Gateway for Spring in Azure Container Apps
2+
title: Migrate Spring Cloud Gateway for Tanzu to a Managed Gateway for Spring in Azure Container Apps
33
description: Describes how to migrate Spring Cloud Gateway for Tanzu to a managed gateway for Spring in Azure Container Apps.
44
author: KarlErickson
55
ms.author: karler
@@ -9,7 +9,7 @@ ms.date: 04/02/2025
99
ms.custom: devx-track-java
1010
---
1111

12-
# Migrate Spring Cloud Gateway for Tanzu to self-hosted gateway application in Azure Container Apps
12+
# Migrate Spring Cloud Gateway for Tanzu to a self-hosted gateway application in Azure Container Apps
1313

1414
[!INCLUDE [deprecation-note](../includes/deprecation-note.md)]
1515

@@ -31,18 +31,20 @@ Note that the features offered by Spring Cloud Gateway for Tanzu are more extens
3131
## Prepare the code of self-hosted Spring Cloud Gateway application
3232

3333
To get the code of the Spring Cloud Gateway:
34+
3435
1. Navigate to https://start.spring.io.
35-
1. Update the project metadata by setting the `Group` to your orgnization's name. Change the `Artifact` and `Name` to `gateway`.
36-
1. Add dependencies `Reactive Gateway` and `Spring Boot Actuator`.
36+
1. Update the project metadata by setting the **Group** to your orgnization's name. Change the **Artifact** and **Name** to **gateway**.
37+
1. Add dependencies **Reactive Gateway** and **Spring Boot Actuator**.
3738
1. Leave the other properties at their default values.
38-
1. Click `Generate` to download the project.
39+
1. Click **Generate** to download the project.
3940

4041
Extract the project when it's downloaded.
4142

4243
## Configure the Spring Cloud Gateway
43-
Once the Spring Cloud Gateway code is ready, navigate to the `gateway/src/main/resources` directory of the project. Rename the `application.properties` file with `application.yml`. You can migrate from Spring Cloud Gateway for Tanzu by configuring the `application.yml`.
4444

45-
The example of `application.yml` is like:
45+
Once the Spring Cloud Gateway code is ready, navigate to the **gateway/src/main/resources** directory of the project. Rename the **application.properties** file with **application.yml**. You can migrate from Spring Cloud Gateway for Tanzu by configuring the **application.yml**.
46+
47+
The example of **application.yml** is like:
4648

4749
```yaml
4850
spring:
@@ -81,22 +83,24 @@ spring:
8183
To migrate the Cross-Origin Resource Sharing (CORS) configuration of Spring Cloud Gateway for Tanzu, you can refer to [CORS Configuration for Spring Cloud Gateway](https://docs.spring.io/spring-cloud-gateway/docs/current/reference/html/#cors-configuration) for global CORS configuration and route CORS configuration.
8284
8385
### Scale
86+
8487
When migrating to Spring Cloud Gateway application in Azure Container Apps, the scaling behavior should align with Azure Container Apps' model. The instance count from Spring Cloud Gateway for Tanzu maps to `min-replica` and `max-replica` in Azure Container Apps. You can configure automatic scaling for the gateway application by defining scaling rules. For more details, refer to [Set scaling rules in Azure Container Apps](/azure/container-apps/scale-app).
8588

8689
The CPU and memory combinations available in Azure Spring Apps differs from those in Azure Container Apps. When mapping resource allocations, ensure that the selected CPU and memory configurations in Azure Container Apps fit both performance needs and supported options.
8790

8891
### Custom domain & certificates
92+
8993
Azure Container Apps supports custom domains and certificates, you can refer to [Domains & certificates](/azure/container-apps/certificates-overview) to migrate custom domains configured on Spring Cloud Gateway for Tanzu.
9094

9195
### Routes
9296

93-
You can migrate the routes in Spring Cloud Gatewy for Tanzu to Spring Cloud Gateway as the example of `application.yml` shows. The following list describes the mapping relationship between routes of Spring Cloud Gateway for Tanzu and routes of Spring Cloud Gateway:
97+
You can migrate the routes in Spring Cloud Gatewy for Tanzu to Spring Cloud Gateway as the example of **application.yml** shows. The following list describes the mapping relationship between routes of Spring Cloud Gateway for Tanzu and routes of Spring Cloud Gateway:
9498

9599
- The `name` of the route is mapped to `id`.
96100
- The `appName` and `protocol` are mapped to the URI of the route, which should be the accessible URI for the Azure Container Apps instance, make sure that the Azure Container Apps applications enable the ingress.
97-
- Predicates and filters of Spring Cloud Gateway for Tanzu are mapped to that of Spring Cloud Gateway. Commercial predicates and filters are not supported, refer to [the document](https://techdocs.broadcom.com/us/en/vmware-tanzu/spring/spring-cloud-gateway-for-kubernetes/2-2/scg-k8s/developer-filters.html) for more details.
101+
- Predicates and filters of Spring Cloud Gateway for Tanzu are mapped to that of Spring Cloud Gateway. Commercial predicates and filters are not supported, refer to [Commercial route filters in Spring Cloud Gateway for K8s](https://techdocs.broadcom.com/us/en/vmware-tanzu/spring/spring-cloud-gateway-for-kubernetes/2-2/scg-k8s/developer-filters.html) for more details.
98102

99-
For example, consider the following route config JSON file, `test-api.json`, which defines the `test-api` route in Spring Cloud Gateway for Tanzu for the `test` app:
103+
For example, consider the following route config JSON file, **test-api.json**, which defines the `test-api` route in Spring Cloud Gateway for Tanzu for the `test` app:
100104

101105
```json
102106
{
@@ -178,7 +182,7 @@ Once the Spring Cloud Gateway configuration is ready, build the image using Azur
178182

179183
### Build and Push the Docker Image
180184

181-
In the Spring Cloud Gateway project directory, create a `Dockerfile` with the following contents:
185+
In the Spring Cloud Gateway project directory, create a **Dockerfile** with the following contents:
182186

183187
```dockerfile
184188
FROM mcr.microsoft.com/openjdk/jdk:17-mariner as build
@@ -241,8 +245,10 @@ If you encounter issues when running the Spring Cloud Gateway application, you c
241245
To monitor gateway application's metrics, refer to [Monitor Azure Container Apps metrics](/azure/container-apps/metrics)
242246

243247
## Known limitation
248+
244249
As far as we know, Spring Cloud Gateway does not support the following commercial features:
250+
245251
- Metadata used to generate OpenAPI documentation
246252
- Single sign-on (SSO) functionality
247253

248-
If these features are required, you may need to consider other commercial solutions, such as Spring Cloud Gateway for Tanzu.
254+
If these features are required, you may need to consider other commercial solutions, such as Spring Cloud Gateway for Tanzu.

0 commit comments

Comments
 (0)