Files
iAOP/deploy/k8s/helm/iaop/README.md
T

66 lines
2.7 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.
# iAOP Helm Chart(一键部署底座)
对应 PRD 5.6「⑥ 部署底座」与 EPIC #8:
K8s/Helm/ArgoCD 部署底座;GPU/NPU 推理后端可插拔(5090 / 华为昇腾)。
**验收:一套 Chart 部署内核 + 模板;切换后端仅改 values,不动业务代码。**
## 目录结构
```
deploy/k8s/helm/iaop/
├── Chart.yaml Chart 元信息(name/version/appVersion)
├── values.yaml 全部配置点(镜像/后端/副本/资源/存储/灰度/域名)
├── templates/
│ ├── _helpers.tpl 标签/名称辅助模板
│ ├── backend-configmap.yaml 推理后端适配层配置(按 backend 分支渲染)
│ ├── deployment.yaml 推理服务 Deployment(nodeSelector 按后端分流)
│ ├── service.yaml ClusterIP 服务(:8000/v1)
│ ├── ingress.yaml 可选域名入口
│ ├── pvc.yaml 模型权重/日志持久化
│ └── NOTES.txt 部署后提示
└── README.md
```
## 一键部署
```bash
helm repo add iaop http://git.xayunmei.com/iaop/charts # 或本地路径
helm install iaop deploy/k8s/helm/iaop -n iaop --create-namespace
```
## 切换推理后端(仅改 values,业务代码零改动)
```bash
# 默认 gpu(NVIDIA 5090,vLLM/Triton):
helm install iaop deploy/k8s/helm/iaop -n iaop \
--set inference.backend=gpu \
--set inference.device=nvidia-5090
# 切换为华为昇腾 NPU(ACL/CANN/MindIE):
helm upgrade iaop deploy/k8s/helm/iaop -n iaop \
--set inference.backend=npu \
--set inference.device=ascend-910b \
--set inference.cannVersion=8.0
```
切换行为(由模板自动处理):
- `backend-configmap.yaml`:渲染对应后端适配层配置(npu 追加 `cann_version`);
- `deployment.yaml`:nodeSelector 自动切到 `ascend.com/npu=true`(GPU 为 `nvidia.com/gpu=true`),
并在 Pod 标签标注 `iaop.ai/inference-backend`;
- 后端实现差异全部收敛在 `core/inference-backend/` 适配层,业务代码零改动。
## 其他配置点(PRD 5.6)
| 配置点 | values 路径 | 说明 |
| --- | --- | --- |
| 资源配额 | `resources.requests/limits` | CPU/内存配额 |
| 推理后端选择 | `inference.backend` | `gpu` / `npu` |
| 灰度发布策略 | `rollingUpdate` | `maxUnavailable: 0, maxSurge: 1`(滚动) |
| 存储 | `storage.*` | 模型权重持久卷 |
| 域名入口 | `ingress.*` | 可选 Ingress |
## 说明
- Chart 未引入任何外部依赖(dependencies 为空),`helm template` 可离线渲染;
- 推理服务镜像对应 `core/inference-backend/` 适配层容器化(本文档发布配套镜像时更新 `image.tag`)。