Files
responses-shim/deploy/responses-shim-h20-cw.yaml

84 lines
3.0 KiB
YAML
Raw Permalink 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.
# 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
# 冒烟(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:
name: responses-shim
labels:
app: responses-shim
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: responses-shim
template:
metadata:
labels:
app: responses-shim
spec:
containers:
- name: shim
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"
- name: LISTEN
value: ":8080"
- name: STOP_SCOPE
value: "content"
ports:
- {containerPort: 8080}
resources:
# 2026-10-09 用户指令:推荐 4c/16Gi 防崩(响应体缓冲,OOM 风险,同 b300 版)
requests:
cpu: "1"
memory: 4Gi
limits:
cpu: "4"
memory: 16Gi
readinessProbe:
httpGet: {path: /healthz, port: 8080}
initialDelaySeconds: 2
periodSeconds: 10
livenessProbe:
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
metadata:
name: responses-shim-h20
labels:
app: responses-shim
spec:
selector:
app: responses-shim
ports:
- name: http
port: 8080
targetPort: 8080