Files
easyai-ai-gateway/deploy/kubernetes/acceptance/protocol-emulator.yaml
T
wangbo 50a13de70b fix(acceptance): 允许模拟器调度到专用 Worker
原因:新香港专用 Worker 节点带有 easyai.io/worker-only NoSchedule taint,现有模拟器只有节点选择器,导致线上验收滚动更新长期 Pending。\n\n影响:协议模拟器可在排除数据库与控制面节点的前提下调度到专用 Worker;正式 API、Worker 和流量门禁不变。\n\n验证:生产 API Server server-side dry-run 通过;manual-release-test 通过;git diff --check 通过。
2026-08-01 21:41:07 +08:00

148 lines
3.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: easyai-acceptance-emulator
namespace: easyai
labels:
app.kubernetes.io/name: easyai-acceptance-emulator
app.kubernetes.io/part-of: easyai-ai-gateway
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: easyai-acceptance-emulator
template:
metadata:
labels:
app.kubernetes.io/name: easyai-acceptance-emulator
app.kubernetes.io/part-of: easyai-ai-gateway
spec:
nodeSelector:
# Keep the memory-heavy protocol emulator away from PostgreSQL and
# control-plane nodes. Any future dedicated Worker node can host it
# without changing this manifest.
easyai.io/worker: "true"
easyai.io/database: "false"
easyai.io/workload: "true"
tolerations:
# Dedicated Worker nodes are protected with this taint. The emulator
# deliberately shares their media/CPU path during validation while
# remaining excluded from database and control-plane nodes.
- key: easyai.io/worker-only
operator: Equal
value: "true"
effect: NoSchedule
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
seccompProfile:
type: RuntimeDefault
containers:
- name: emulator
image: easyai-api
command: ["/app/easyai-ai-gateway-acceptance-emulator"]
env:
- name: HTTP_ADDR
value: ":8090"
ports:
- name: http
containerPort: 8090
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: "2"
memory: 1Gi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
readOnlyRootFilesystem: true
---
apiVersion: v1
kind: Service
metadata:
name: easyai-acceptance-emulator
namespace: easyai
spec:
selector:
app.kubernetes.io/name: easyai-acceptance-emulator
ports:
- name: http
port: 8090
targetPort: http
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: easyai-acceptance-callback-collector
namespace: easyai
labels:
app.kubernetes.io/name: easyai-acceptance-callback-collector
app.kubernetes.io/part-of: easyai-ai-gateway
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: easyai-acceptance-callback-collector
template:
metadata:
labels:
app.kubernetes.io/name: easyai-acceptance-callback-collector
app.kubernetes.io/part-of: easyai-ai-gateway
spec:
nodeSelector:
easyai.io/site: hongkong
easyai.io/workload: "true"
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
seccompProfile:
type: RuntimeDefault
containers:
- name: collector
image: easyai-api
command: ["/app/easyai-ai-gateway-acceptance-callback-collector"]
env:
- name: HTTP_ADDR
value: ":8091"
ports:
- name: http
containerPort: 8091
readinessProbe:
httpGet:
path: /healthz
port: http
resources:
requests:
cpu: 20m
memory: 32Mi
limits:
cpu: 250m
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
readOnlyRootFilesystem: true
---
apiVersion: v1
kind: Service
metadata:
name: easyai-acceptance-callback-collector
namespace: easyai
spec:
selector:
app.kubernetes.io/name: easyai-acceptance-callback-collector
ports:
- name: http
port: 8091
targetPort: http