Files
aiops/PROJECT_EVALUATION.md
T
attacker 8637036995 feat(k8s): M4 ConfigMap/Secret 在线编辑
- YamlViewer 增加 autoEdit prop,打开即进入编辑模式
- NamespaceResourcePage ConfigMap/Secret 行增加编辑按钮(铅笔图标)
- 统一 cleanBeforeEdit=true,编辑前自动清理 status/managedFields/uid
- 端到端验证: GET YAML → PUT 更新 → curl 确认 K8s label 生效
- 更新 ROADMAP/PROJECT_EVALUATION
2026-06-23 02:33:31 +08:00

55 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# K8s 管理功能评估基线
> 生成时间: 2026-06-21 | 评估人: Logan + AI
## 总体规模
| 层 | 规模 |
|----|------|
| 后端 `kubernetes.go` | 2583 行 / 99 个函数 / 74 个路由 |
| 后端 `kubernetesclient/client.go` | 1486 行 |
| 前端组件 | 22 个 .tsx / 7498 行 |
## 功能评估
### ✅ 已完成(90%)
| 功能 | 后端 | 前端 | 验证状态 |
|------|:----:|:----:|:--------:|
| 集群 CRUD + 同步 | ✅ | ✅ | ✅ 已验证 |
| 集群表单(名称即 code) | ✅ | ✅ NAME_RE 正则 | ✅ |
| 节点列表 + 实时 metrics | ✅ ListNodes 调 GetNodeMetrics | ✅ ClusterOverviewPage | ⚠️ 实时OK,DB缓存缺 |
| Pod 列表 | ✅ | ✅ | ✅ |
| Deployment 列表/详情 | ✅ | ✅ DeploymentView + DeploymentWorkload | ✅ |
| Deployment view/edit 路由 | ✅ | ✅ /:mode/:kind/:name | ✅ |
| Deployment 伸缩/重启/镜像更新 | ✅ scale/restart/update-image | ✅ | ✅ |
| Deployment 历史版本/回滚 | ✅ revisions/rollback | ✅ | ✅ |
| Pod 日志(实时流) | ✅ GetPodLogs | ✅ PodLogsViewer fetch stream | ✅ |
| Pod 终端 exec | ✅ ExecTerminal(WS) | ✅ PodExecTerminal bash/sh/ash | ✅ |
| Pod 文件浏览 + 下载 + 上传 | ✅ files/list + files/download + files/upload | ✅ PodFileBrowser | ✅ |
| YAML 查看/编辑 | ✅ GetYAML + UpdateYAML | ✅ YamlViewer | ✅ |
| ReplicaSet 列表 | ✅ | ✅ | ✅ |
| Service/Ingress 列表 | ✅ | ✅ | ✅ |
| HPA 列表/创建/删除 | ✅ | ✅ | ✅ |
| ConfigMap/Secret 列表 | ✅ | ✅ | ✅ |
| ConfigMap/Secret 编辑 | ✅ UpdateResourceYAMLNS | ✅ YamlViewer(autoEdit) | ✅ curl 验证 |
| Events 列表 | ✅ ListEvents | ✅ EventsPage | ✅ |
| 容量分析 | ✅ GetCapacityAnalysis | ✅ CapacityPage | ✅ |
| kubectl 终端 | ✅ KubectlShell(WS) | ✅ KubectlTerminal | ✅ |
| 拓扑图 | ✅ topology get/save | ✅ TopologyView | ✅ |
### ❌ 缺失(10%)
| 功能 | 优先级 | 说明 |
|------|:------:|------|
| Pod 文件上传 | ✅ | P2 | ✅ 已完成 M3 |
| CI/CD 集成菜单项 | P3 | 菜单有按钮但未接线 |
| Deployment 暂停更新 | P3 | 菜单无此项 |
### ⚠️ 已知架构约束
1. **K8s 集群(161/162)是 CentOS 7** — MySQL 8.0 容器跑不了(x86-64-v2),用 hostNetwork + 外部 MySQL
2. **metrics-server 已安装** — `kubectl top nodes` 正常返回
3. **自研 K8s 客户端** — 不用 client-go,保持轻量 net/http 方案
4. **两个数据路径**:ListNodes 实时调 API(含 metrics),SyncCluster 写 DB(缺 metrics)→ 前端不同页面读不同路径