Files
ocdp-go/tasks/todo.md
Ivan087 7f238a3168 refactor: full-stack restructure with multi-tenancy, workspace management, and K8s diagnostics
- Add Workspace domain (entity, repository, service, handler, DTO)
- Add multi-tenant K8s client with tenant binding and quota management
- Add K8s diagnostics client (instance diagnostics)
- Add authorization middleware (authz package)
- Restructure frontend to feature-based architecture (features/)
- Add User Management page in configuration
- Add AccessDenied page and route guards
- Refactor shared components (form inputs, layout, UI)
- Update Tailwind config for new design system
- Add comprehensive documentation (docs/, tasks/, plans)
- Improve cluster service with better kubeconfig handling
- Add tests for crypto, config, helm client, tenant binding
2026-05-12 16:15:14 +08:00

37 lines
1.5 KiB
Markdown

# OCDP 第二次测试 - 完成
## 交付文档
| 文档 | 路径 | 内容 |
|------|------|------|
| 综合报告 | `docs/test2-report.md` | 3 个测试的完整结果 |
| 配额测试详情 | `docs/test2-quota.md` | 配额限额详细分析 |
| Values 优先级测试 | `docs/test2-values-priority.md` | values 覆盖测试+冲突测试 |
| UI 溢出/滚动/刷新 | `docs/test2-ui-overflow.md` | Playwright + 源码分析 |
## 核心发现
### 1. 资源配额
| 发现 | 影响 |
|------|------|
| ✅ K8s ResourceQuota 对象正确创建并生效 | cpu/gpu/mem 限制在 pod 级别执行 |
| ❌ **无 API 层预检查** | 后端接受所有部署请求,配额耗尽时 pod stuck pending-install |
| ❌ **GPU 配额可绕过** | gpu=0 用户能提交需要 GPU 的 chart |
| ❌ **实例不会自动 failed** | 超配额实例永远 stuck 在 pending-install |
### 2. Values 覆盖优先级
| 优先级 | 来源 | 说明 |
|--------|------|------|
| 🥇 **最高** | `values` JSON 字段 | 结构化 JSON - 覆盖一切 |
| 🥈 **中** | `valuesYaml` 字符串 | 被 values JSON 覆盖 |
| 🥉 **最低** | Chart 内置 values.yaml | 默认基线 |
| ⚠️ **冲突时静默覆盖,无警告** | 两者都提供时 values JSON 全胜 | |
### 3. 前端 UI
| 测试 | 结论 |
|------|------|
| 水平溢出 | ✅ 无问题 |
| 响应式 | ✅ sm/md/lg/xl 正确 |
| 滚动 | ✅ 流畅 |
| 刷新 | ✅ 正常 |
| 颜色对比度 | ⚠️ 登录错误文本 red-400 WCAG AA 不合格 |