Commit Graph

103 Commits

Author SHA1 Message Date
Kimi CLI
fbc54c9ac5 docs: reorganize documentation, remove GSD workflow files
Some checks failed
Build and Push Docker / build (push) Failing after 2m33s
- Add CLEANDDD-WORKFLOW.md - CleanDDD development workflow guide
- Keep GATEWAY_ADMIN_README.md and DATABASE_SCHEMA_FIX.md
- Remove all .planning/ GSD workflow documents
- Remove old EF migrations (using EnsureCreated for test env)
2026-03-08 15:48:58 +08:00
Kimi CLI
2f8c35ef3e fix: update Platform packages to v1.0.17 and fix Gateway DB schema
Some checks failed
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
5dc9dc5979 IMPL-6: 集成 ConfigNotificationService 通知网关
All checks were successful
Build and Push Docker / build (push) Successful in 2m39s
- 在 Confirm 方法中添加事务包装,确保数据库写入的原子性
- 注入 ConsoleDbContext 用于事务管理
- 添加详细的日志记录:
  - 配置确认开始/结束
  - 数据库写入成功
  - 事务提交/回滚
  - NOTIFY 发送成功/失败
  - 缓存移除成功/失败
- 事务处理逻辑:先提交数据库事务,再发送 NOTIFY
- NOTIFY 失败不影响数据一致性(仅记录错误)
2026-03-08 10:29:30 +08:00
movingsam
83085c6dea IMPL-5: 实现 PendingConfigController API
All checks were successful
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 生成待确认配置
All checks were successful
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
5f27300035 IMPL-2: 实现 Service Label 解析器
Some checks are pending
Build and Push Docker / build (push) Waiting to run
- 创建 GatewayConfigModel 数据模型
- 创建 ServiceLabelParser 解析器类
- 实现 Label 到模型字段的映射逻辑
- 添加必需字段验证(ServiceName, ClusterId, PathPrefix, DestinationId)
- 支持批量解析和可选字段提取
- 提供服务地址和端口自动提取功能
2026-03-08 00:54:56 +08:00
movingsam
ec85b285bc feat: 添加 TenantCode 到 GwDestination 的 EF Core 迁移
Some checks failed
Build and Push Docker / build (push) Has been cancelled
2026-03-08 00:53:57 +08:00
movingsam
595a264b11 chore: 更新 Fengling.Platform.Domain 到 1.0.14 2026-03-08 00:53:55 +08:00
movingsam
3ec055b871 feat(gateway-config): 实现 K8s 服务监听和待确认配置管理基础结构
All checks were successful
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
All checks were successful
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
da1048c3ae docs(phase-4): add plan for Platform 1.0.12 entity adaptation 2026-03-04 10:24:48 +08:00
movingsam
e05e10df95 chore: 更新 Fengling.Platform.Infrastructure 到 1.0.12 2026-03-04 10:19:07 +08:00
movingsam
b787fcc415 docs: update roadmap with phase 3 plan 2026-03-03 09:55:54 +08:00
movingsam
161cd5e5c2 docs(03): add phase 3 plan 2026-03-03 09:55:31 +08:00
movingsam
916aaabf89 docs: update to use PostgreSQL NOTIFY for broadcast 2026-03-02 18:22:05 +08:00
movingsam
e497b7e1cc docs: add PROJECT.md and STATE.md for console
- Define console as central management system
- Document current gateway integration status
- Track pending tasks for broadcast mechanism
2026-03-02 18:19:49 +08:00
movingsam
807dcfd422 chore(workflows): 添加缺失的actions/checkout步骤
All checks were successful
Build and Push Docker / build (push) Successful in 5m7s
- 在docker.yml工作流的build阶段添加了actions/checkout@v4步骤
- 确保后续构建步骤能够访问代码库
- 修正构建过程中缺少源码检出的错误
2026-03-01 23:23:11 +08:00
movingsam
dd319a11ae chore(workflows): 优化Docker构建工作流配置
Some checks failed
Build and Push Docker / build (push) Failing after 20s
- 移除不必要的docker守护进程配置步骤
- 直接使用docker setup-buildx-action设置buildx插件
- 更新buildx驱动和选项配置为docker-container模式
- 清理冗余空行,提升配置文件简洁性
2026-03-01 23:18:50 +08:00
movingsam
be39498010 fix(workflows): 修正docker构建工作流配置格式
Some checks failed
Build and Push Docker / build (push) Failing after 0s
- 规范push分支配置格式,添加空格
- 修复Docker Buildx步骤的缩进问题
- 添加内联配置,支持私有仓库地址的http和不安全访问
- 调整docker守护进程重启逻辑,增加sleep等待
- 优化缓存步骤格式,确保缓存生效
2026-03-01 23:17:23 +08:00
movingsam
f1238a9b2e fix(workflows): 修复docker认证信息使用错误
Some checks failed
Build and Push Docker / build (push) Failing after 25s
- 将docker登录的用户名从固定字符串改为使用secret管理
- 将docker登录的密码从固定GITEA_TOKEN改为使用专用密码secret
- 提高了CI/CD流程中docker登录步骤的安全性和灵活性
2026-03-01 23:12:22 +08:00
movingsam
3ba9703744 fix(workflows): 修改 Docker 登录用户名
Some checks failed
Build and Push Docker / build (push) Failing after 20s
- 将 Docker 登录的用户名从 fengling 改为 movingsam
- 保持密码使用 GITEA_TOKEN 密钥
- 确保登录流程凭证正确更新
2026-03-01 23:10:35 +08:00
movingsam
0c79e9d947 ci(workflows): 配置 Docker 支持不安全的注册表
Some checks failed
Build and Push Docker / build (push) Failing after 3m9s
- 在 Docker workflow 中添加配置,允许访问指定的不安全注册表
- 创建并写入 /etc/docker/daemon.json 文件,设置 insecure-registries 项
- 发送信号重启 Docker 守护进程使配置生效
- 增加延时等待 Docker 重启完成
2026-03-01 22:50:53 +08:00
movingsam
ac0776cc9c ci(workflows): 优化Docker构建及推送流程
Some checks failed
Build and Push Docker / build (push) Failing after 4m19s
- 更新Docker镜像仓库地址为内部私有地址
- 修改buildx驱动配置,允许不安全权限项
- 修正登录动作中秘钥参数名为GITEA_TOKEN
- 简化缓存目录移动脚本,确保缓存正确更新
- 关闭构建溯源信息生成以提升构建速度
2026-03-01 22:14:51 +08:00
movingsam
bad0de9f3b chore(docker): 替换基础镜像地址为私有仓库
Some checks failed
Build and Push Docker / build (push) Failing after 5m9s
- 将aspnet基础镜像地址替换为192.168.100.120私有仓库地址
- 将dotnet sdk镜像地址同样替换为私有仓库地址

docs(gateway): 补充YARP网关插件系统规划文档

- 增加整体架构图及说明,明确各项目职责
- 详细描述Web UI管理界面技术选型及功能模块
- 规范文档结构,提升可读性和完整性
2026-03-01 20:19:36 +08:00
movingsam
ecafe1984c ci(workflows): 增加 Docker Buildx 设置步骤
Some checks failed
Build and Push Docker / build (push) Failing after 29m44s
- 在 GitHub Actions 工作流中添加 Docker Buildx 配置
- 使用最新的 moby/buildkit 镜像作为驱动选项
- 优化构建环境以支持多平台构建功能
2026-03-01 16:42:06 +08:00
movingsam
bce6aaa33f chore(docker): 优化 Docker 构建缓存管理
Some checks failed
Build and Push Docker / build (push) Failing after 31s
- 使用 actions/cache 缓存 Docker 构建层,加快构建速度
- 统一缓存路径改为 /tmp/.buildx-cache 以简化管理
- 更新构建缓存的来源和目标目录配置
- 确保构建结束时正确移动缓存文件,避免缓存丢失

docs(gateway): 新增网关插件系统技术方案文档

- 详细描述插件系统的设计目标和核心功能
- 规划基于 Razor Pages 的 Web UI 管理界面
- 设计插件类型接口及生命周期管理方案
2026-03-01 16:38:10 +08:00
movingsam
9c59d6881b chore(docker): 添加 NuGet.Config 文件到镜像构建
Some checks failed
Build and Push Docker / build (push) Has been cancelled
- 在 Dockerfile 中新增 COPY 指令,拷贝 NuGet.Config 文件
- 支持镜像构建时使用自定义的 NuGet 源配置
- 保持现有依赖恢复流程不变
- 增强构建过程的灵活性和可配置性
2026-03-01 16:22:33 +08:00
movingsam
7c9409b858 fix(nuget): 删除gitea源中多余的包模式
Some checks failed
Build and Push Docker / build (push) Failing after 42m58s
- 移除packageSourceMapping中gitea源下的"NetCorePal.*"包模式
- 保留"Fengling.*"包模式配置
- 保证NuGet.Config配置的准确性和简洁性
2026-03-01 15:21:10 +08:00
movingsam
f163d6c92a fix(ci): 使用本地文件系统缓存替代GitHub Actions缓存
Some checks failed
Build and Push Docker / build (push) Failing after 47m55s
- 将 cache type 从 gha 改为 local
- 缓存路径设为 /data/.buildx-cache (Runner持久化目录)
- 添加 Move cache 步骤防止缓存损坏
2026-03-01 14:15:32 +08:00
movingsam
36de011e2d chore(ci): 移除无用的Gitea构建与部署工作流文件
Some checks failed
Build and Push Docker / build (push) Has been cancelled
- 删除了.gitea/workflows/build.yml文件及其相关构建配置
- 删除了.gitea/workflowschore(ci): 删除Gitea的构建和部署工作流配置

- 移除build.yml文件及其所有构建相关步骤
- 移除deploy.yml文件及其所有部署相关步骤
- 停用基于GitHub Actions/deploy.yml文件及其相关部署配置
-的自动构建和K8s部署流程
- 清理冗余的CI/CD配置文件和环境变量设置 清理了CI流水线中基于GitHub Actions的构建与部署步骤
- 简化了项目仓库的持续集成配置维护工作量
2026-03-01 14:02:31 +08:00
movingsam
18813f905a fix(ci): 修正 Docker 构建配置和 Dockerfile 路径
Some checks failed
Build / build (push) Failing after 1m42s
Deploy to K8s / deploy (push) Failing after 2s
Build and Push Docker / build (push) Has been cancelled
- 修正 docker.yml 中 dockerfile 参数为 file 以匹配 action 版本要求
- 优化 Dockerfile,调整项目文件拷贝路径及恢复依赖步骤
- 统一工作目录路径,确保构建命令正确执行
- 删除多余的复制和恢复步骤,简化构建流程
2026-03-01 13:42:03 +08:00
movingsam
7f645ddd13 refactor(gateway): 优化网关服务逻辑,修改Id类型并引入存储接口
Some checks failed
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 服务
Some checks failed
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
Some checks failed
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
Some checks failed
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
00e5bbad0e fix: 修复 docker.yml 重复的 dockerfile 键
Some checks failed
Build / build (push) Failing after 31s
Deploy to K8s / deploy (push) Failing after 3s
Build and Push Docker / build (push) Failing after 19s
2026-02-28 22:13:45 +08:00
movingsam
f109def90e fix: 修复 docker.yml context 为根目录
Some checks failed
Build / build (push) Failing after 33s
Deploy to K8s / deploy (push) Failing after 3s
2026-02-28 22:12:09 +08:00
movingsam
03a8c955ce fix: 修复 docker.yml YAML 语法错误 (重复 dockerfile 键)
Some checks failed
Build / build (push) Failing after 34s
Deploy to K8s / deploy (push) Failing after 4s
Build and Push Docker / build (push) Failing after 49s
2026-02-28 22:06:36 +08:00
movingsam
69b82966b5 fix: 修复 CI/CD Docker 构建 context 和 Dockerfile 路径
Some checks failed
Build / build (push) Failing after 31s
Deploy to K8s / deploy (push) Failing after 3s
- context 改为 ./src
- dockerfile 改为相对于 context 的路径
2026-02-28 21:55:15 +08:00
movingsam
feb1a733cd fix: 修复 CI/CD Dockerfile 路径
Some checks failed
Build / build (push) Failing after 34s
Deploy to K8s / deploy (push) Failing after 2s
Build and Push Docker / build (push) Failing after 16s
- 修改 dockerfile 路径为 ./src/Dockerfile
2026-02-28 21:52:11 +08:00
movingsam
b8d2a93c9f docs: 添加代码库分析文档(中文)
- STACK.md - 技术栈和依赖
- INTEGRATIONS.md - 外部集成
- ARCHITECTURE.md - 架构设计
- STRUCTURE.md - 代码库结构
- CONVENTIONS.md - 编码规范
- TESTING.md - 测试模式
- CONCERNS.md - 技术债务和问题
2026-02-28 18:38:17 +08:00
movingsam
7bf4c41e41 fix: 修复 CI/CD workflow 文件 YAML 语法错误
Some checks failed
Build / build (push) Failing after 1m19s
Deploy to K8s / deploy (push) Failing after 3s
Build and Push Docker / build (push) Failing after 19s
- 移除错误的语法前缀 #XX|#
- 确保 workflow 文件可被 GitHub Actions 正确解析
2026-02-28 18:07:20 +08:00
movingsam
4d3fb84663 chore(solution): 删除解决方案中的Dockerfile引用
- 从解决方案文件中移除对Dockerfile的引用
- 保持.gitea工作流文件docker.yml的引用不变
- 优化解决方案结构,避免无用文件引用
2026-02-28 18:04:53 +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
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
e945de5872 Update secret name to GITEATOKEN
Some checks failed
Build and Push Docker / build (push) Failing after 6m30s
2026-02-26 13:05:37 +08:00
573f135367 Update Docker CI for org
Some checks failed
Build and Push Docker / build (push) Failing after 30s
2026-02-26 13:00:18 +08:00
8495a8ad9e Add Docker CI workflow
Some checks failed
Build and Push Docker / build (push) Failing after 31s
2026-02-26 10:58:40 +08:00
b639206258 Add Dockerfile 2026-02-26 10:55:47 +08:00
Sam
65063af016 Remove bin folder 2026-02-25 18:44:37 +08:00