movingsam
|
595a264b11
|
chore: 更新 Fengling.Platform.Domain 到 1.0.14
|
2026-03-08 00:53: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
|
e05e10df95
|
chore: 更新 Fengling.Platform.Infrastructure 到 1.0.12
|
2026-03-04 10:19:07 +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
|
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
|
797ac930bd
|
fix: 修复项目引用和 GatewayService using
Build / build (push) Failing after 39s
Deploy to K8s / deploy (push) Failing after 4s
Build and Push Docker / build (push) Failing after 24s
- 移除重复的 Directory.Packages.props 内容
- 清理 GatewayService.cs 中未使用的 using
|
2026-02-28 23:00:47 +08:00 |
|
movingsam
|
ca491924ae
|
feat: 添加 CPM 中央包管理和 CI/CD 配置
- 添加 global.json 统一 .NET SDK 版本 (10.0.103)
- 添加 Directory.Build.props 和 Directory.Packages.props 中央包管理
- 添加 NuGet.Config 包源映射 (gitea + nuget.org)
- 添加 CI 工作流: build.yml (编译), docker.yml (构建镜像), deploy.yml (K8s 部署)
- 添加 k8s/ 目录: deployment.yaml, service.yaml
- 修复项目引用路径
- 升级 Swashbuckle 7.1.0 + Microsoft.OpenApi 1.6.28 解决 .NET 10 兼容性
|
2026-02-28 14:05:38 +08:00 |
|