feat: 接入 Database 三资源 API 与分层绑定协调
Verify / test (pull_request) Successful in 11m39s
Verify / lint (pull_request) Successful in 12m51s
Verify / database-integration (pull_request) Successful in 13m12s

确定单库单账号、集群级 Database、资源侧先写绑定和凭据定位合同。领域层承载纯规则,service 协調流程,Kubernetes adapter 负责资源呈现与版本保护。

验证:全量 make test、三轮 race、真实 API server 并发与重启补写、最小 RBAC/watch、lint 和文档检查通过。供应、凭据交付及删除清理尚未实现,保留 DeletionPending/finalizer 边界。
This commit is contained in:
2026-09-25 04:09:43 +00:00
parent 347a667c0c
commit 7e9e8e828b
33 changed files with 3516 additions and 45 deletions
@@ -0,0 +1,15 @@
# 管理员登记已有数据库;不会因创建 CR 就修改数据库或凭据。
apiVersion: database.ayatori.ddupan.top/v1alpha1
kind: PostgreSQLDatabase
metadata:
name: imported-app
spec:
instanceRef:
name: shared-postgres
database: existing_app
loginRole: existing_app
source: Import
credentialRef:
mount: secret
path: existing/app/postgresql
reclaimPolicy: Retain