diff --git a/deploy/responses-shim-h20-cw.yaml b/deploy/responses-shim-h20-cw.yaml index d73fbef..ec72edf 100644 --- a/deploy/responses-shim-h20-cw.yaml +++ b/deploy/responses-shim-h20-cw.yaml @@ -1,12 +1,15 @@ -# responses-shim — 安徽游方-H20 集群版 -# 与 b300 版差异:①无 nodeSelector(平台按 --node-group 线上H20 注入调度约束) -# ②上游指向 ds0731 的 sglang router Service(ds-v4-flash-0731;若后续 H20 重上 dsv4.1, -# 改 UPSTREAM_BASE 即可)③镜像来自 kmctl create image(kaniko 从 Gitee 源码构建,平台用户镜像) +# responses-shim — 安徽游方-H20 集群版(hostPath 共享存储方案,2026-09-30) +# 背景:H20 集群拉不动 Gitee(kaniko 源码构建路不通),节点无 docker 不能本地构建。 +# 方案:静态二进制 scp 到共享存储 /mnt/data/ymk/responses-shim/shim(游方8机 ssh 别名 +# 游方8机112.30.185.182,端口 53409),Pod 用 new-api 壳镜像(umirror 无 alpine,集群已有此 +# 镜像缓存秒拉)+ hostPath 挂载直接运行。升级 shim = scp 新二进制覆盖同名文件 + 删 Pod 重建。 +# 上游:ds0731 的 sglang router Service(ds-v4-flash-0731;H20 重上 dsv4.1 后改 UPSTREAM_BASE)。 # 部署: wsl kmctl --cluster 安徽游方-H20 create cw responses-shim-h20 \ # -f /mnt/d/B300/responses-shim/deploy/responses-shim-h20-cw.yaml --node-group 线上H20 -# 冒烟(scratch 无 shell,借 newapi pod 执行): -# wsl kmctl --cluster 安徽游方-H20 exec cw ymk-newapi --pod -- \ -# sh -c 'curl -s http://responses-shim-h20:8080/healthz' +# 冒烟(kmctl exec 仅支持训练任务,cw 不行;从节点 ssh 直接 curl ClusterIP 10.96.1.79): +# ssh 游方8机112.30.185.182 'curl -s http://10.96.1.79:8080/healthz' +# 鉴权:上游 router 要求 --api-key sk-bzub63827vi3jgd9vk6hr3v5scawpds9,shim 原样透传 +# Authorization 头,new-api 渠道里填该 key 即可(shim 不持 key)。 apiVersion: apps/v1 kind: Deployment metadata: @@ -27,8 +30,9 @@ spec: spec: containers: - name: shim - image: __H20_IMAGE__ # kmctl create image 产物,部署前替换 + image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/calciumion/new-api:v1.0.0-rc.30 # 仅作运行壳,二进制来自挂载 imagePullPolicy: IfNotPresent + command: ["/ymk/responses-shim/shim"] env: - name: UPSTREAM_BASE value: "http://sglang-router-svc-ds-4p4d:8000" @@ -53,6 +57,15 @@ spec: httpGet: {path: /healthz, port: 8080} initialDelaySeconds: 5 periodSeconds: 20 + volumeMounts: + - name: ymk-shared + mountPath: /ymk + readOnly: true + volumes: + - name: ymk-shared + hostPath: + path: /mnt/data/ymk + type: Directory --- apiVersion: v1 kind: Service