Kimi CLI
ca27d8659d
docs: remove GSD workflow planning documents
...
- Remove .planning/ directory (GSD workflow artifacts)
- Remove 网关配置的新想法.md (outdated design doc)
- Keep only essential technical documentation
2026-03-08 15:49:12 +08:00
Kimi CLI
7ca5e879b4
chore: add Npgsql log level config to suppress GSSAPI warnings
...
- Set Logging__LogLevel__Npgsql to Error in ConfigMap
- Prevents libgssapi_krb5.so.2 warning spam in logs
2026-03-08 15:21:18 +08:00
movingsam
4dff327fa6
test: fix integration test expectations and data isolation
...
- Fix ClusterId expectations in ConfigReloadTests
- Use unique namespace in K8sDiscoveryTests to avoid test interference
- Add cleanup after test execution
2026-03-08 11:07:59 +08:00
movingsam
650f2f48e0
fix: improve RouteCache tenant route loading logic
...
- Change from if-else if to separate if statements
- Ensure tenant routes are loaded regardless of IsGlobal flag
- Add detailed logging for route loading
- Fix null check for GetRoute parameters
2026-03-08 11:05:36 +08:00
movingsam
1b13efffc5
fix: add null check in RouteCache.GetRoute to prevent ArgumentNullException
...
- Allow nullable tenantCode and serviceName parameters
- Return null early if serviceName is null or empty
- Fix test: GetRoute_WithNullServiceName_ShouldReturnNull
2026-03-08 11:01:49 +08:00
movingsam
faba26043f
IMPL-12: 完善端到端集成测试基础设施和修复递归问题
...
- 更新 TestFixture 添加 Mock Redis 和内存数据库配置
- 修复 DynamicProxyConfigProvider 中的递归问题
- 添加 GwPendingServiceDiscovery 实体模型
- 修复测试数据模型与实际代码的匹配问题
37/44 集成测试通过,失败测试主要由于测试间状态共享
2026-03-08 10:57:40 +08:00
movingsam
9b77169b80
test: add end-to-end integration tests (IMPL-12)
...
- TestFixture: Base test infrastructure with WebApplicationFactory
- K8sDiscoveryTests: K8s Service Label discovery flow tests
- ConfigConfirmationTests: Pending config confirmation flow tests
- MultiTenantRoutingTests: Tenant-specific vs default destination routing tests
- ConfigReloadTests: Gateway hot-reload via NOTIFY mechanism tests
- TestData: Mock data for K8s services, JWT tokens, database seeding
Tests cover:
1. K8s Service discovery with valid labels
2. Config confirmation -> DB write -> NOTIFY
3. Multi-tenant routing (dedicated vs default destination)
4. Gateway config hot-reload without restart
2026-03-08 10:53:19 +08:00
movingsam
4fd931d44b
IMPL-11: 更新 TenantRoutingMiddleware 适配新 Transform
...
职责分离:
- Middleware: 负责 JWT 验证、TenantId 验证、设置 ClusterId 和 TenantId 到 HttpContext.Items
- Transform: 负责从数据库查询 Destination 并设置 ProxyRequest.RequestUri
修改内容:
1. TenantRoutingMiddleware:
- 添加设置 TenantId 到 HttpContext.Items 供 Transform 使用
- 修复服务名提取正则表达式,支持连字符(-)和下划线(_)
- 更新 XML 文档,明确职责分离说明
2. TenantRoutingTransform:
- 添加 ExtractTenantId 方法,优先从 HttpContext.Items 获取 TenantId
- 保留从 JWT 提取作为回退机制
3. 单元测试:
- 新增职责分离验证测试 (ShouldNotSetDestinationUri, ShouldOnlySetClusterIdAndTenantId)
- 新增与 Transform 协作测试 (ShouldSetItemsForTransformConsumption)
- 更新服务名提取测试,支持更多字符类型
- 总测试数: 24个,全部通过
2026-03-08 01:20:20 +08:00
movingsam
c7cf1d3738
feat: add TenantRoutingTransform for multi-tenant routing (IMPL-10)
...
- Implement YARP RequestTransform to route requests based on tenant
- Extract tenant ID from JWT token (supports multiple claim types)
- Query tenant-specific destination first, fallback to default
- Add IMemoryCache for performance optimization (5min expiration)
- Update Platform packages to 1.0.14 to use GwDestination.TenantCode
2026-03-08 01:01:22 +08:00
movingsam
52eba07097
feat: add MigrationTool for gateway config migration (IMPL-7)
...
- Create MigrationTool console app for exporting DB config to K8s YAML
- Support dry-run mode and validation
- Add Npgsql and YamlDotNet dependencies
2026-03-08 00:35:04 +08:00
movingsam
8bdc24f374
chore: 添加阶段6 - 网关插件技术调研与实现
2026-03-04 14:29:11 +08:00
movingsam
cc11c7258f
fix: 更新单元测试适配新模型
...
- RouteCacheTests: 使用 Fengling.Platform.Domain
- 更新 Id 类型为 string (Guid)
- 更新 PathPattern 为 Match.Path
- TenantRoutingMiddlewareTests: 更新 Id 类型为 string
2026-03-04 13:45:04 +08:00
movingsam
449fe3a385
refactor: 移除 GatewayConfigController - 网关只需转发请求
2026-03-04 13:35:49 +08:00
movingsam
0c08620565
refactor: 升级 Fengling.Platform.Infrastructure 到 1.0.12 并迁移到新模型
...
- 升级 Fengling.Platform.Infrastructure 包到 1.0.12
- DatabaseRouteConfigProvider: 使用 GwTenantRoutes 和 GwRouteMatch
- DatabaseClusterConfigProvider: 使用 GwClusters 和内嵌 Destinations
- GatewayDbContext: 添加兼容性别名 (TenantRoutes, ServiceInstances)
- RouteCache: 更新使用新的模型结构
- 暂时禁用 GatewayConfigController 和测试 (需要重写以适配新模型)
2026-03-04 13:30:35 +08:00
movingsam
28941fc0ef
chore: 升级 Fengling.Platform.Infrastructure 到 1.0.12
2026-03-04 13:17:22 +08:00
movingsam
6b2d480692
docs(quick): 更新 STATE.md 添加快速任务 001 记录
2026-03-04 13:14:57 +08:00
movingsam
42b8c9cca5
fix: 升级 Fengling.Platform 包并修复编译警告
...
- 修复 CS0108: GatewayDbContext.Tenants 隐藏继承成员
- 修复 NU1506: 移除重复 PackageVersion 定义
- 修复 NU1507: 添加包源映射配置 (NuGet.Config)
2026-03-04 13:14:26 +08:00
movingsam
3994a95177
feat: remove K8s health check from gateway (Phase 2)
...
- Delete KubernetesPendingSyncService.cs
- Delete PendingServicesController.cs
- Delete GwPendingServiceDiscovery.cs model
- Update GatewayDbContext.cs - remove DbSet
- Update Program.cs - remove service registration and using statements
- Update roadmap and requirements documentation
2026-03-02 18:42:54 +08:00
movingsam
ee8b73ce7f
docs: add Phase 2 plan for K8s health check removal
2026-03-02 18:35:39 +08:00
movingsam
5bce01796a
docs: mark Phase 1 as complete - existing PgSqlConfigChangeListener already satisfies all requirements
2026-03-02 18:31:28 +08:00
movingsam
c333ccecb2
docs: clarify Phase 1 scope - gateway listener only, console broadcast is separate
2026-03-02 18:23:59 +08:00
movingsam
ee6bb763b9
docs: update to use PostgreSQL NOTIFY for broadcast (lighter than Redis)
2026-03-02 18:21:59 +08:00
movingsam
27ea1d1c21
docs: update gateway PROJECT.md with console integration status
...
- Add console integration status to PROJECT.md
- Add console PROJECT.md and STATE.md
2026-03-02 18:19:43 +08:00
movingsam
8f7e8d3a71
docs: update all planning docs to Chinese
2026-03-02 18:15:23 +08:00
movingsam
b420ca1f1b
docs: initialize project - gateway architecture planning
...
- Add PROJECT.md with core value and requirements
- Add config.json with yolo workflow preferences
- Add REQUIREMENTS.md with 18 v1 requirements
- Add ROADMAP.md with 5 phases
- Add STATE.md with project memory
2026-03-02 18:12:23 +08:00
movingsam
da4f03502a
refactor: reorganize project structure into yarpgateway folder
...
- Move YarpGateway and all source files to src/yarpgateway/
- Keep Fengling.Gateway.Plugin.Abstractions at src/ level
- Fix duplicate project reference in YarpGateway.slnx
- Update solution paths and test project references
- Add ProjectReference from YarpGateway to abstractions
2026-03-01 17:47:48 +08:00
movingsam
4839366227
feat(plugin): 添加 NuGet 包发布配置
...
- 添加包元数据到 csproj
- 创建 nuget.yml 发布工作流
2026-03-01 17:10:06 +08:00
movingsam
09957364e2
feat(plugin): 添加插件抽象层项目 Fengling.Gateway.Plugin.Abstractions
...
- 创建插件接口定义 (IGatewayPlugin, IRequestPlugin, IResponsePlugin, IRouteTransformPlugin, ILoadBalancePlugin)
- 添加 YARP 引用用于类型定义
2026-03-01 17:00:48 +08:00
movingsam
a96ba1f3d2
docs: 添加网关插件系统技术方案文档
2026-03-01 16:53:28 +08:00
movingsam
52f4b7616e
docs: add security audit and test plan
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 18:38:38 +08:00
movingsam
5755b41664
chore: add test project to solution
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 18:38:21 +08:00
movingsam
d7007d0d7f
config: improve Redis configuration and credentials management
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 18:38:07 +08:00
movingsam
eec65c1e05
security: enhance JWT and tenant routing middleware
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 18:37:48 +08:00
movingsam
2a4a06ddb8
feat: add JWT authentication to gateway
...
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-02-28 18:37:31 +08:00
movingsam
0cbb5a2c0e
docs: map YARP gateway codebase
2026-02-28 15:44:16 +08:00
movingsam
6ea7f6c958
feat: add k8s deployment manifests and fix docker workflow env
...
- Add k8s/base/deployment.yaml with Namespace, ConfigMap, Secret, Deployment and Service for YARP gateway
- Fix duplicate REGISTRY/IMAGE_NAME env vars in docker.yml
2026-02-28 15:24:40 +08:00
movingsam
d533a8111b
ci: add Docker buildx cache for faster builds
2026-02-28 13:16:36 +08:00
movingsam
564d664426
refactor: move project to src/ and add slnx
...
Build and Deploy / build (push) Successful in 22s
Build and Deploy / docker (push) Successful in 26m23s
Build and Deploy / deploy (push) Failing after 3s
- Add YarpGateway.slnx solution file
- Move all project files to src/ directory
- Update Dockerfile for new src/ path structure
- Update CI/CD workflow with src/ project path
- Fix NuGet package references (use Gitea NuGet packages)
- Add CPM (Central Package Management) with Directory.Packages.props
2026-02-28 13:10:41 +08:00
movingsam
ca2c0d69a2
fix(dockerfile): 修正Docker构建流程和文件路径
...
Build and Deploy / build (push) Successful in 19s
Build and Deploy / docker (push) Successful in 38m56s
Build and Deploy / deploy (push) Failing after 3m40s
- 删除多余的目录拷贝,简化COPY指令
- 统一项目文件和配置文件的拷贝路径
- 调整工作目录,避免重复嵌套路径
- 优化dotnet restore和build步骤,确保路径正确
- 保持publish阶段项目路径一致,确保发布成功
2026-02-27 22:06:29 +08:00
movingsam
8d2eeea982
fix(workflows): 修正 Docker 镜像推送的认证令牌
...
Build and Deploy / build (push) Successful in 19s
Build and Deploy / docker (push) Failing after 21s
Build and Deploy / deploy (push) Has been skipped
- 将 Docker 镜像推送步骤中的认证密码从 GITEA_TOKEN 更新为 DOCKER_TOKEN
- 确保使用正确的 Docker 注册表访问令牌进行认证
- 避免因令牌错误导致的镜像上传失败
2026-02-27 22:04:23 +08:00
movingsam
1295246daf
chore(workflows): 移除docker.yml中无用的docker服务配置
...
Build and Deploy / build (push) Successful in 22s
Build and Deploy / docker (push) Failing after 20s
Build and Deploy / deploy (push) Has been skipped
- 删除了docker.yml中docker:dind服务相关配置
- 去除了DOCKER_HOST和DOCKER_TLS_VERIFY环境变量设置
- 简化了工作流以减少不必要的服务启动
- 保留了checkout步骤以保证代码获取正常运行
2026-02-27 21:50:07 +08:00
movingsam
c12e3f22f1
ci(workflows): 优化docker.yml配置以支持docker服务
...
Build and Deploy / build (push) Successful in 22s
Build and Deploy / docker (push) Failing after 9s
Build and Deploy / deploy (push) Has been skipped
- 在docker.yml工作流中添加docker-in-docker服务支持
- 配置服务端口2376并设置特权模式
- 添加环境变量DOCKER_HOST和DOCKER_TLS_VERIFY以正确连接docker服务
- 修正密码环境变量名称由GITEATOKEN改为GITEA_TOKEN保证一致性
2026-02-27 21:42:50 +08:00
movingsam
b2478fb25b
chore(ci): 添加集中管理NuGet包版本并优化GitHub Actions工作流
...
Build and Deploy / build (push) Successful in 36s
Build and Deploy / docker (push) Failing after 30s
Build and Deploy / deploy (push) Has been skipped
- 在Directory.Build.props和Directory.Packages.props中启用包版本集中管理
- 统一管理多个关键依赖项的版本号,包括Fengling服务发现、Microsoft和Serilog组件
- 重构YarpGateway.csproj从项目引用改为包引用以支持包版本集中管理
- 新增NuGet.Config文件配置企业私有源和官方源凭证
- 完善GitHub Actions工作流,添加.NET环境设置及依赖恢复
- 拆分构建、Docker构建推送及部署步骤,增加Kubernetes部署实现
- 支持push和pr触发,使用动态标签和metadata管理镜像版本
- 自动更新Kubernetes部署镜像标签并进行回滚状态检查与验证
2026-02-27 21:11:13 +08:00
b9aea78495
Update secret name to GITEATOKEN
Build and Push Docker / build (push) Failing after 49s
2026-02-26 13:05:40 +08:00
9a25793740
Update Docker CI for org
Build and Push Docker / build (push) Has been cancelled
2026-02-26 13:00:20 +08:00
8d8a009bbd
Add Docker CI workflow
Build and Push Docker / build (push) Failing after 30s
2026-02-26 10:58:23 +08:00
Sam
60c0a4d5cf
Add .gitignore
2026-02-25 17:28:18 +08:00
movingsam
abe3456ccb
feat[gateway]: add K8s service discovery with pending approval workflow
...
- Add PendingServiceDiscovery model and database migration
- Add PendingServices API controller for service assignment
- Add KubernetesPendingSyncService for background sync
- Add RBAC configuration for K8s service discovery
- Update Dockerfile and K8s deployment configs
- Add service discovery design documentation
Workflow: K8s services with label managed-by=yarp are discovered
and stored in pending table. Admin approves before they become
active gateway downstream services.
2026-02-22 22:14:54 +08:00
movingsam
a39824397c
refactor: align TenantRepository with CleanDDD/NetCorePal规范
...
- remove duplicate ITenantRepository/TenantRepository from Console
- extend Platform ITenantRepository with GetByIdAsync, GetPagedAsync, CountAsync
- update Console services to use Platform.Infrastructure.Repositories
- fix nullable warnings (UserDto, OAuthClientService)
- fix YarpGateway Directory.Build.props duplicate import
- fix DynamicProxyConfigProvider CS8618 warning
2026-02-19 19:20:06 +08:00
movingsam
6f690c76fa
chore: update docs, fix strongly typed ID, add docker config
...
- docs: move completed docs to completed folder (points-rule-system, migrate-to-vben-admin)
- docs: update project progress (Member 175 tests, Fengling.Console mostly done)
- fix: update CampaignExecutionService to use campaignId.Id instead of .Value
- chore: add dockerignore and docker config to YarpGateway
2026-02-19 18:45:48 +08:00