134 lines
3.5 KiB
YAML
134 lines
3.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: easyai-server
|
|
labels:
|
|
app.kubernetes.io/name: easyai-server
|
|
spec:
|
|
replicas: 2
|
|
revisionHistoryLimit: 3
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: easyai-server
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: easyai-server
|
|
spec:
|
|
serviceAccountName: easyai-workload
|
|
terminationGracePeriodSeconds: 60
|
|
containers:
|
|
- name: easyai-server
|
|
image: registry.cn-shanghai.aliyuncs.com/comfy-ai/comfy-server:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: http
|
|
containerPort: 3001
|
|
- name: tcp-inbound
|
|
containerPort: 4001
|
|
envFrom:
|
|
- configMapRef:
|
|
name: easyai-app-config
|
|
- secretRef:
|
|
name: easyai-app-secret
|
|
env:
|
|
- name: CONFIG_INSTANCE_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: CONFIG_VIDEO_EDIT_API_URL
|
|
value: http://video-edit:8000
|
|
- name: SANDBOX_SERVICE_BASE_URL
|
|
value: http://sandbox:8000
|
|
- name: ASG_TCP_HOST
|
|
value: easyai-asg
|
|
- name: ASG_TCP_PORT
|
|
value: "4003"
|
|
- name: MEMORY_TCP_HOST
|
|
value: agent-memory
|
|
- name: MEMORY_TCP_PORT
|
|
value: "4004"
|
|
- name: GATEWAY_INBOUND_ENABLED
|
|
value: "true"
|
|
- name: GATEWAY_INBOUND_TCP_LISTEN_HOST
|
|
value: 0.0.0.0
|
|
- name: GATEWAY_INBOUND_TCP_PORT
|
|
value: "4001"
|
|
- name: WS_GATEWAY_TCP_HOST
|
|
value: ws-gateway
|
|
- name: WS_GATEWAY_TCP_PORT
|
|
value: "4002"
|
|
volumeMounts:
|
|
- name: shared-files
|
|
mountPath: /app/upload
|
|
subPath: upload
|
|
- name: shared-files
|
|
mountPath: /app/backups
|
|
subPath: backups
|
|
- name: shared-files
|
|
mountPath: /app/restores
|
|
subPath: restores
|
|
- name: app-tmp
|
|
mountPath: /app/tmp
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
startupProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 6
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
limits:
|
|
cpu: "2"
|
|
memory: 2500Mi
|
|
volumes:
|
|
- name: shared-files
|
|
emptyDir: {}
|
|
- name: app-tmp
|
|
emptyDir: {}
|
|
- name: tmp
|
|
emptyDir: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: easyai-server
|
|
labels:
|
|
app.kubernetes.io/name: easyai-server
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app.kubernetes.io/name: easyai-server
|
|
ports:
|
|
- name: http
|
|
port: 3001
|
|
targetPort: http
|
|
- name: tcp-inbound
|
|
port: 4001
|
|
targetPort: tcp-inbound
|