feat(api-gateway): retire teacher/student/parent-bff, route GraphQL to apollo-router
v2.1 M9+M10: BFF layer and old portals retired.
- api-gateway: remove TeacherBffURL/StudentBffURL/ParentBffURL config
- api-gateway: add ApolloRouterURL config and /api/graphql route
- api-gateway: /api/admin/graphql now proxies to apollo-router
- api-gateway: health checks now ping apollo-router instead of BFF
- deploy.yml: replace teacher-bff service block with apollo-router
- deploy.yml: add config-service service block (M3 dependency)
- deploy.yml: remove teacher-portal and admin-portal service blocks
- source code in services/{teacher,student,parent}-bff/ and apps/*-portal/ retained for rollback
This commit is contained in:
@@ -9,6 +9,9 @@ import (
|
||||
// Config 持有 api-gateway 运行时配置。
|
||||
// P2 起 JWT 验签改 RS256(IAM 签发,Gateway 用 JWKS 公钥校验),
|
||||
// JWTSecret 仅在 DevMode 下作为 mock 密钥保留。
|
||||
//
|
||||
// v2.1 M9:teacher-bff / student-bff / parent-bff 已下线,
|
||||
// 由 apollo-router(GraphQL 联邦)替代 BFF 聚合层。
|
||||
type Config struct {
|
||||
Port string
|
||||
JWKSURL string // RS256 公钥端点(IAM GET /.well-known/jwks.json)
|
||||
@@ -18,9 +21,7 @@ type Config struct {
|
||||
CORSOrigins string
|
||||
ClassesServiceURL string
|
||||
IamServiceURL string
|
||||
TeacherBffURL string
|
||||
StudentBffURL string
|
||||
ParentBffURL string
|
||||
ApolloRouterURL string // v2.1 M9:apollo-router GraphQL 联邦入口
|
||||
CoreEduServiceURL string
|
||||
ContentServiceURL string
|
||||
DataAnaServiceURL string
|
||||
@@ -77,9 +78,7 @@ func Load() *Config {
|
||||
CORSOrigins: getEnv("CORS_ORIGINS", ""),
|
||||
ClassesServiceURL: getEnv("CLASSES_SERVICE_URL", "http://localhost:3001"),
|
||||
IamServiceURL: getEnv("IAM_SERVICE_URL", "http://localhost:3002"),
|
||||
TeacherBffURL: getEnv("TEACHER_BFF_URL", "http://localhost:3003"),
|
||||
StudentBffURL: getEnv("STUDENT_BFF_URL", "http://localhost:3009"),
|
||||
ParentBffURL: getEnv("PARENT_BFF_URL", "http://localhost:3010"),
|
||||
ApolloRouterURL: getEnv("APOLLO_ROUTER_URL", "http://localhost:3000"),
|
||||
CoreEduServiceURL: getEnv("CORE_EDU_SERVICE_URL", "http://localhost:3004"),
|
||||
ContentServiceURL: getEnv("CONTENT_SERVICE_URL", "http://localhost:3005"),
|
||||
DataAnaServiceURL: getEnv("DATA_ANA_SERVICE_URL", "http://localhost:3006"),
|
||||
|
||||
Reference in New Issue
Block a user