fix(k8s): 同步 local 模式数据路径为 /app/sqlite3.db 与二进制同级
- deployment/quick-deploy: PVC 挂载 sqlite3.db/redka.db 到 /app/,含旧 data/ 迁移 - configmap 与 run.sh 状态输出对齐新路径 - README 补充 local 模式说明
This commit is contained in:
1 parent
d27a2e6cbe
commit
8df0acb338
7 files changed
+71
-10
No files matched your search
@@ -16,6 +16,7 @@ AIOps 平台在 Kubernetes 上的部署清单(Go/Gin 后端 + go:embed 前端
|
||||
| `mysql.yaml` | MySQL 8.0 StatefulSet + Headless Service + 10Gi 持久卷 |
|
||||
| `redis.yaml` | Redis 7 StatefulSet + Headless Service + 2Gi 持久卷 |
|
||||
| `deployment.yaml` | AIOps Deployment(embed 单端口 8080)+ NodePort Service (30080) |
|
||||
| `pvc-aiops-data.yaml` | local 模式 PVC:`sqlite3.db` / `redka.db` 与 `/app/aiops` 同级 |
|
||||
| `ingress.yaml` | Ingress:所有流量 → aiops:8080(含 WebSocket 支持) |
|
||||
|
||||
## 架构
|
||||
@@ -123,6 +124,17 @@ kubectl -n devops get pvc
|
||||
|
||||
## 配置说明
|
||||
|
||||
### local 模式(默认 `MODE=local`)
|
||||
|
||||
- 容器内工作目录 `/app`,数据文件与二进制同级:
|
||||
- `/app/aiops` — 应用二进制(镜像内)
|
||||
- `/app/sqlite3.db` — SQLite(PVC 持久化)
|
||||
- `/app/redka.db` — 本地缓存(PVC 持久化)
|
||||
- `replicas` 必须为 **1**(SQLite 不支持多副本共享);`./run.sh kubernetes scale` 扩到 >1 时会自动切 `MODE=release` + MySQL/Redis
|
||||
- 旧版 PVC 若存有 `data/sqlite3.db`,init 容器会自动迁移到根路径
|
||||
|
||||
### 集群凭据
|
||||
|
||||
| 项目 | 来源 | 值 |
|
||||
|------|------|----|
|
||||
| MySQL 业务账号 | Secret `aiops-secret` | 用户 `aiops` / 密码 `aiops_pass_2026` / 库 `aiops` |
|
||||
|
||||
Reference in new issue
Block a user