Skip to content

Commit 6e4cb4c

Browse files
authored
docs(apollo): announce staged plugin-store migration (#7627)
1 parent 0363808 commit 6e4cb4c

4 files changed

Lines changed: 220 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Apache ShenYu is a Java-based gateway for service proxying, protocol conversion,
3838
| Registration and discovery | Client SDKs register service addresses and API metadata with Admin. Registry integrations support discovery; an optional Kubernetes controller reconciles Ingress and Endpoints resources. |
3939
| Security and traffic control | WAF, signing, authentication plugins, load balancing, rate limiting, and fault tolerance through Resilience4j and Sentinel; deprecated Hystrix remains available as an external plugin (see [plugin-store-hystrix](docs/plugin-store-hystrix.md)). |
4040
| Caching and transformation | In-memory or Redis-backed response caching, URL rewriting, redirection, and request/response transformation. |
41-
| Dynamic configuration | Admin persists plugins, selectors, rules, metadata, and authentication data. WebSocket sync is the default; HTTP long polling, ZooKeeper, Nacos, etcd, and Apollo are available. Consul sync is available as an external extension (see [plugin-store-consul](docs/plugin-store-consul.md)). Gateway replicas apply updates to their local caches. |
41+
| Dynamic configuration | Admin persists plugins, selectors, rules, metadata, and authentication data. WebSocket sync is the default; HTTP long polling, ZooKeeper, Nacos, and etcd are available. Apollo remains available during its deprecation release and is planned to move to an external extension (see [Apollo migration](docs/plugin-store-apollo.md)). Consul sync is available as an external extension (see [plugin-store-consul](docs/plugin-store-consul.md)). Gateway replicas apply updates to their local caches. |
4242
| Observability | Metrics and logging plugins, including Kafka and Elasticsearch destinations; email and DingTalk alerts from Admin. |
4343
| AI and MCP | AI proxy, prompt processing, token limits, sensitive-word filtering, AI request/response transformation, and an MCP server plugin with SSE and Streamable HTTP. |
4444

‎RELEASE-NOTES.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
### API Changes
44

5+
- Apollo's in-tree registry, sync adapter, Admin listener and sync starter are
6+
deprecated for transfer to plugin-store (#7599). All four remain available in
7+
the release carrying this notice. Removal requires dev-list consensus, a full
8+
released deprecation cycle, compatible external artifact publication and an
9+
announced rollback window; no removal release is scheduled. See the
10+
[migration guide](docs/plugin-store-apollo.md). Existing `apollo` type names,
11+
keys and `ApolloPathConstants` remain compatibility contracts.
12+
513
- `MemorySafeLRUMap` is deprecated since 2.7.2. The class, public constructors,
614
serialization identifier and existing behavior are retained for downstream
715
source and binary compatibility. No removal release is scheduled; a future

‎docs/plugin-store-apollo.md‎

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
# Apollo plugin-store migration
18+
19+
## Status and deprecation cycle
20+
21+
Apollo is currently an optional, supported in-tree integration. Issue [#7599](https://github.com/apache/shenyu/issues/7599)
22+
proposes transferring its registry, data-sync, Admin listener and gateway starter to
23+
[plugin-store](https://github.com/apache/shenyu-plugin-store), extending [#7306](https://github.com/apache/shenyu/issues/7306).
24+
This guide is the advance deprecation notice: the in-tree modules remain available
25+
for the release carrying this notice. No removal release has been selected.
26+
The separate removal PR is a draft and must not be merged in that deprecation release.
27+
28+
| Stage | Required action |
29+
| --- | --- |
30+
| Agreement | Obtain and link the dev-list decision approving Apollo externalization. |
31+
| Deprecation release | Ship this notice and migration guide in a core release while retaining all four in-tree modules. Record that released version publicly. |
32+
| Receiving parity | Build/test all four modules together in plugin-store, verify external SPI loading and unchanged sync/registry configuration. |
33+
| Publication | Announce compatible core/store versions, publish external artifacts before cutover, and reserve one publisher per Maven group/artifact/version. |
34+
| Later core release | After the deprecation release has shipped, merge the separate removal, update the release inventory, and announce the rollback window. |
35+
36+
Do not treat creating PRs, merging documentation, or producing local snapshot JARs
37+
as completing the dev-list decision, a released deprecation cycle, or artifact publication.
38+
Keep the issue open until all stages and their release evidence are complete.
39+
40+
## Artifact ownership and installation
41+
42+
The receiving `shenyu-extension-apollo` reactor owns these artifacts together:
43+
44+
- `shenyu-admin-listener-apollo`
45+
- `shenyu-sync-data-apollo`
46+
- `shenyu-registry-apollo`
47+
- `shenyu-spring-boot-starter-sync-data-apollo`
48+
49+
The preparation branch uses store `2.7.1-SNAPSHOT` against core `2.7.2-SNAPSHOT`.
50+
These are development coordinates, not an announced release compatibility matrix.
51+
For deployment, select the published store release declared compatible with your core release.
52+
Use the core version for retained APIs and the store version for **all four** Apollo artifacts.
53+
Keep exactly one provider version on each runtime classpath; the in-tree and external
54+
implementations retain identical packages and must not coexist.
55+
56+
Admin needs:
57+
58+
```xml
59+
<dependency>
60+
<groupId>org.apache.shenyu</groupId>
61+
<artifactId>shenyu-admin-listener-apollo</artifactId>
62+
<version>${store.version}</version>
63+
</dependency>
64+
```
65+
66+
Gateway data synchronization needs:
67+
68+
```xml
69+
<dependency>
70+
<groupId>org.apache.shenyu</groupId>
71+
<artifactId>shenyu-spring-boot-starter-sync-data-apollo</artifactId>
72+
<version>${store.version}</version>
73+
</dependency>
74+
```
75+
76+
Applications using Apollo instance registration or SDK instance discovery additionally need:
77+
78+
```xml
79+
<dependency>
80+
<groupId>org.apache.shenyu</groupId>
81+
<artifactId>shenyu-registry-apollo</artifactId>
82+
<version>${store.version}</version>
83+
</dependency>
84+
```
85+
86+
Gateway registration also requires the retained core `shenyu-spring-boot-starter-registry`;
87+
SDK discovery requires the appropriate SDK starter. Apollo was never included in the
88+
compatibility registry starter, so it remains an explicit provider dependency.
89+
For binary distributions, resolve the complete runtime dependency closure into `lib/`,
90+
replace old Apollo JARs, and retain the extension's licensing information and dependency notices.
91+
92+
Shading continues to package Apollo client dependencies, but excludes retained ShenYu
93+
API artifacts and sibling extension modules. API classes come from the application's core artifacts, preserving
94+
class identity for external SPI loading. The published POM retains runtime dependencies.
95+
96+
## Enable Admin and gateway synchronization
97+
98+
Admin keeps its existing property prefix and portal publishing settings:
99+
100+
```yaml
101+
shenyu:
102+
sync:
103+
websocket:
104+
enabled: false
105+
apollo:
106+
appId: shenyu
107+
meta: http://apollo-config-service:8080
108+
portalUrl: http://apollo-portal:8070
109+
env: DEV
110+
clusterName: default
111+
namespace: application
112+
token: ${APOLLO_OPENAPI_TOKEN}
113+
operatorUser: apollo
114+
```
115+
116+
Gateway keeps the same reading settings; remove or disable the previous sync channel:
117+
118+
```yaml
119+
shenyu:
120+
namespace: 649330b6-c2d7-4edc-be8e-8a54df9eb385
121+
sync:
122+
websocket:
123+
urls: false
124+
apollo:
125+
appId: shenyu
126+
meta: http://apollo-config-service:8080
127+
env: DEV
128+
clusterName: default
129+
namespace: application
130+
accessKey: ${APOLLO_ACCESS_KEY:}
131+
```
132+
133+
The portal OpenAPI token and config-service access key serve different APIs.
134+
Ensure the publishing app, environment, cluster and Apollo namespace match the reader.
135+
The preserved reader calls Apollo `ConfigService.getAppConfig()`, so the example uses
136+
`application`. This migration does not add arbitrary namespace selection.
137+
The ShenYu namespace ID is a separate tenant prefix inside Apollo item keys.
138+
The Apollo client sets JVM-wide app/meta/cluster properties; preserve the existing
139+
process-level configuration when using sync and registry together.
140+
141+
## Registry and SPI contract
142+
143+
The external JAR continues to publish:
144+
145+
```text
146+
META-INF/shenyu/org.apache.shenyu.registry.api.ShenyuInstanceRegisterRepository
147+
apollo=org.apache.shenyu.registry.apollo.ApolloInstanceRegisterRepository
148+
```
149+
150+
`ShenyuInstanceRegisterRepositoryFactory.loadRepository("apollo")` resolves that
151+
resource without any factory or core runtime change, and preserves the non-singleton provider.
152+
Registry configuration remains:
153+
154+
```yaml
155+
shenyu:
156+
register:
157+
enabled: true
158+
registerType: apollo
159+
serverLists: http://apollo-config-service:8080
160+
props:
161+
appId: shenyu
162+
portalUrl: http://apollo-portal:8070
163+
token: ${APOLLO_OPENAPI_TOKEN}
164+
env: DEV
165+
clusterName: default
166+
namespace: application
167+
```
168+
169+
SDK discovery uses the same `apollo` type and registry settings via its existing SDK
170+
configuration; it does not replace backend HTTP annotation/API registration.
171+
Instance registration writes persistent portal items and publishes the namespace.
172+
Existing shutdown removes listeners; it does not deregister persistent instance items.
173+
Preserve that behavior during migration and apply your existing instance-removal procedure.
174+
175+
## Stored keys and shared compatibility shim
176+
177+
| Data | Existing Apollo item key |
178+
| --- | --- |
179+
| Plugin | `<shenyuNamespace>.plugin.<pluginName>` |
180+
| Selector | `<shenyuNamespace>.selector.<pluginName>.<selectorId>` |
181+
| Rule | `<shenyuNamespace>.rule.<pluginName>.<selectorId>.<ruleId>` |
182+
| Authentication | `<shenyuNamespace>.auth.<appKey>` |
183+
| Metadata | `<shenyuNamespace>.meta.<metadataId>` |
184+
| Proxy selector | `<shenyuNamespace>.proxy.selector.<pluginName>.<selectorId>` |
185+
| Discovery upstream | `<shenyuNamespace>.discovery.<pluginName>.<selectorId>` |
186+
| Instance | `/shenyu/register/instance/<appName>/<host>:<port>` |
187+
188+
The existing `.list` index items under each category/group are retained alongside the data keys.
189+
JSON DTOs, key prefixes, namespace IDs and the `apollo` type remain unchanged.
190+
`org.apache.shenyu.common.constant.ApolloPathConstants` stays in core as a small
191+
constants/path compatibility shim with no Apollo SDK dependency. Do not duplicate that
192+
class in store JARs or migrate/delete existing keyspaces as part of this transfer.
193+
194+
The client versions remain `apollo-client`, `apollo-openapi` and `apollo-core` `2.1.0`.
195+
Source and the Apollo clients are Apache-2.0; preserve licenses when assembling custom packages.
196+
Existing unit tests, real Apollo `DefaultConfig` listener filtering tests and starter
197+
configuration tests move with their modules. Those tests do not claim a full live Apollo
198+
portal/config-service deployment; validate your staging deployment before production cutover.
199+
200+
## Upgrade and rollback
201+
202+
1. After publication and release gates pass, back up the Admin database and Apollo
203+
application/namespace configuration, recording exact core/store versions and deployed JARs.
204+
2. Verify the external artifacts in staging using unchanged namespace, endpoints, tokens,
205+
keys and registry properties. Check initial sync, create/update/delete and instance updates.
206+
3. Roll Admin and gateways with complete external dependency closures, then confirm
207+
subsequent changes propagate and existing instance discovery still works.
208+
4. Retain the last in-tree release for the announced rollback window. To roll back,
209+
restore its images/JARs and configuration and remove the external Apollo versions.
210+
Reuse the same Admin database and Apollo keyspace; do not clear either during rollback.

‎shenyu-registry/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ runtime classpath, using the same ShenYu version as the application:
4040
| `zookeeper` | `shenyu-registry-zookeeper` |
4141
| `etcd` | `shenyu-registry-etcd` |
4242
| `nacos` | `shenyu-registry-nacos` |
43-
| `apollo` | `shenyu-registry-apollo` |
43+
| `apollo` | `shenyu-registry-apollo`; in-tree deprecation and planned external ownership: [migration guide](../docs/plugin-store-apollo.md) |
4444
| `eureka` | `shenyu-registry-eureka` |
4545
| `kubernetes` | `shenyu-registry-kubernetes` |
4646

0 commit comments

Comments
 (0)