Files
NianAIGC/deploy/ack/worker.yaml

50 lines
1.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: zhinian-worker
namespace: zhinian
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: zhinian
app.kubernetes.io/component: worker
template:
metadata:
labels:
app.kubernetes.io/name: zhinian
app.kubernetes.io/component: worker
spec:
automountServiceAccountToken: false
securityContext:
seccompProfile:
type: RuntimeDefault
containers:
- name: worker
image: REGISTRY/PROJECT/zhinian-aigc:REPLACE_TAG
imagePullPolicy: IfNotPresent
command: ["node", "scripts/worker.mjs"]
env:
- name: NODE_ENV
value: production
- name: ZHINIAN_WORKER_BASE_URL
value: http://zhinian-web:3000
- name: ZHINIAN_WORKER_REQUEST_TIMEOUT_MS
value: "120000"
- name: ZHINIAN_INTERNAL_WORKER_TOKEN
valueFrom:
secretKeyRef:
name: zhinian-worker-auth
key: ZHINIAN_INTERNAL_WORKER_TOKEN
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]