Kimi CLI
2f8c35ef3e
fix: update Platform packages to v1.0.17 and fix Gateway DB schema
...
Build and Push Docker / build (push) Failing after 2m40s
- Update Fengling.Platform.Domain/Infrastructure from 1.0.14 to 1.0.17
- Add temporary EnsureDeletedAsync() to recreate Gateway DB tables
- Fix bigint/character varying type mismatch in GwCluster.Id
- Add Npgsql log level config to suppress GSSAPI warnings
- Add DATABASE_SCHEMA_FIX.md documentation
Refs: AGENTS.md Recent Changes 2026-03-08
2026-03-08 15:21:09 +08:00
movingsam
83085c6dea
IMPL-5: 实现 PendingConfigController API
...
Build and Push Docker / build (push) Successful in 2m39s
- 创建 PendingConfigDtos.cs 包含所有 DTO 类
- 创建 PendingConfigController.cs 实现 CRUD 操作
- 支持列表查询(分页、筛选、搜索)
- 支持确认配置(写入数据库 + 发送 NOTIFY)
- 支持拒绝配置(从缓存移除)
- 支持修改配置(更新缓存并标记状态)
- 添加管理员权限控制
- 集成 Swagger XML 文档
- 在 Program.cs 中注册通知服务
2026-03-08 01:19:59 +08:00
movingsam
0e04bb1690
IMPL-3: 集成 PendingConfigCache 生成待确认配置
...
Build and Push Docker / build (push) Successful in 5m37s
- 创建 PendingConfigCache 类,支持内存缓存存储
- 实现变更检测逻辑(对比 ResourceVersion 和 Label Hash)
- 实现核心方法:AddOrUpdate, Get, GetAll, Remove, Clear
- 集成到 K8sServiceWatchService,在 Watch 事件中生成待确认配置
- 支持防止重复生成和状态标记(IsNew/IsModified)
2026-03-08 00:57:55 +08:00
movingsam
3ec055b871
feat(gateway-config): 实现 K8s 服务监听和待确认配置管理基础结构
...
Build and Push Docker / build (push) Successful in 4m28s
本次提交包含网关配置重构的第一阶段实现(IMPL-1, IMPL-4):
## 新增功能
### 1. K8s 服务监听服务 (IMPL-1)
- 新增 K8sServiceWatchService - 后台服务监听 Kubernetes Service 变化
- 支持 Watch API 和自动重连机制(指数退避策略)
- 使用 Channel 处理事件,防止内存无限增长
- 支持集群内配置和本地 kubeconfig 两种模式
### 2. 待确认配置管理 (IMPL-4)
- 新增 PendingConfig 实体,用于存储待用户确认的配置变更
- 新增 PendingConfigType 枚举(Route, Cluster, Destination)
- 新增 PendingConfigSource 枚举(K8sDiscovery, Manual)
- 新增 PendingConfigStatus 枚举(Pending, Confirmed, Rejected, Modified)
- 生成 EF Core 迁移 AddPendingConfig,创建 gw_pending_configs 表
## 技术变更
### NuGet 包
- 添加 KubernetesClient 16.0.2 包引用
### 数据库
- 更新 ConsoleDbContext,添加 PendingConfigs DbSet
- 配置 PendingConfig 表索引(Status, ServiceName, CreatedAt)
### EF Core 兼容性修复
- 修复 EF Core 10 中 JSON 值对象的映射问题
- 使用值转换器替代 OwnsOne().ToJson() 配置
## 文件变更
- 新增: src/Services/K8sServiceWatchService.cs
- 新增: src/Models/Entities/PendingConfig.cs
- 新增: src/Models/Entities/PendingConfigEnums.cs
- 新增: src/Migrations/20260307161935_AddPendingConfig.cs
- 修改: src/Program.cs (注册 K8sServiceWatch)
- 修改: src/Data/ConsoleDbContext.cs (添加实体配置)
- 修改: Directory.Packages.props (添加 KubernetesClient)
关联任务: IMPL-1, IMPL-4
关联重构计划: WFS-gateway-refactor
2026-03-08 00:32:30 +08:00
movingsam
154484d2dc
refactor(gateway): adapt to Platform 1.0.12 entity changes
...
Build and Push Docker / build (push) Successful in 6m44s
- Remove IInstanceStore DI registration (replaced by IClusterStore)
- Remove GwTenant and GwServiceInstance from ConsoleDbContext config
- Update GatewayService to use Match.Path instead of PathPattern
- Cast RouteStatus enum to int for Status field
- Add 04-SUMMARY.md documentation
BREAKING CHANGE: Gateway entity API changes in Platform 1.0.12
2026-03-04 13:00:11 +08:00
movingsam
7f645ddd13
refactor(gateway): 优化网关服务逻辑,修改Id类型并引入存储接口
...
Build / build (push) Failing after 41s
Deploy to K8s / deploy (push) Failing after 2s
Build and Push Docker / build (push) Failing after 17s
- 将网关服务相关实体Id类型由long改为string,统一使用Guid V7格式Id
- 新增ConsoleDbContext,配置数据库表命名规范,适配PostgreSQL约定
- 引入IRouteStore和IInstanceStore接口,替代直接使用DbContext访问数据库
- 修改GatewayService实现,调用存储接口进行数据操作以支持解耦扩展
- 调整GatewayController中实例Id参数类型为string,保证一致性
- 更新GatewayDto中各实体的Id类型为string,确保与数据库模型匹配
- 在项目配置中添加EntityFrameworkCore.Design依赖及版本更新
- 新增DesignTimeDbContextFactory方便迁移和设计时上下文创建
- 删除appsettings.json中的GatewayConnection配置,简化连接字符串配置
2026-03-01 13:33:02 +08:00
movingsam
634e6fe455
feat: 注册 Platform 的 Gateway Store/Manager 服务
...
Build / build (push) Failing after 30s
Deploy to K8s / deploy (push) Failing after 2s
Build and Push Docker / build (push) Failing after 18s
- 添加 IRouteStore, IInstanceStore, IRouteManager 依赖注入
- 为后续迁移到 Platform 的 Store/Manager 模式做准备
2026-03-01 01:43:44 +08:00
movingsam
0678b44a90
refactor: Gateway 改用 PlatformDbContext
...
Build / build (push) Failing after 44s
Deploy to K8s / deploy (push) Failing after 2s
Build and Push Docker / build (push) Failing after 17s
- 移除单独的 GatewayDbContext,使用 PlatformDbContext
- 修改 DbSet 名称为 GwTenantRoutes, GwServiceInstances
- 添加必要的 using 引用
2026-03-01 01:34:59 +08:00
movingsam
c50615d8d1
refactor: 将项目文件迁移到 src 目录并创建 slnx 解决方案
...
- 将 Controllers, Services, Models, Properties 等目录移至 src/ 下
- 创建 Fengling.Console.slnx Rider 解决方案文件
- 更新 csproj 中的项目引用路径
- 修复 CI/CD 配置:
- build.yml: 更新项目路径为 src/Fengling.Console.csproj
- docker.yml: 添加 Dockerfile 路径指向 src/Dockerfile
- Dockerfile: 修复 COPY 路径以匹配新的目录结构
Closes #重构项目结构
2026-02-28 18:04:16 +08:00