初始化提交

This commit is contained in:
chengcheng
2026-07-09 19:29:46 +08:00
commit 821ffe9e70
25 changed files with 2713 additions and 0 deletions
+82
View File
@@ -0,0 +1,82 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: agent-memory
labels:
app.kubernetes.io/name: agent-memory
spec:
replicas: 2
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: agent-memory
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app.kubernetes.io/name: agent-memory
spec:
serviceAccountName: easyai-workload
terminationGracePeriodSeconds: 45
containers:
- name: agent-memory
image: registry.cn-shanghai.aliyuncs.com/easyaigc/agent-memory:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 3004
- name: tcp
containerPort: 4004
envFrom:
- configMapRef:
name: easyai-app-config
- secretRef:
name: easyai-app-secret
env:
- name: MEMORY_AI_BASE_URL
value: http://easyai-server:3001
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: "1"
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: agent-memory
labels:
app.kubernetes.io/name: agent-memory
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: agent-memory
ports:
- name: http
port: 3004
targetPort: http
- name: tcp
port: 4004
targetPort: tcp
+92
View File
@@ -0,0 +1,92 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: easyai-asg
labels:
app.kubernetes.io/name: easyai-asg
spec:
replicas: 2
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: easyai-asg
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app.kubernetes.io/name: easyai-asg
spec:
serviceAccountName: easyai-workload
terminationGracePeriodSeconds: 45
containers:
- name: easyai-asg
image: registry.cn-shanghai.aliyuncs.com/easyaigc/agent-governance:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 3003
- name: tcp
containerPort: 4003
envFrom:
- configMapRef:
name: easyai-app-config
- secretRef:
name: easyai-app-secret
env:
- name: ASG_TCP_HOST
value: 0.0.0.0
- name: ASG_TCP_PORT
value: "4003"
- name: ASG_MAIN_BACKEND_URL
value: http://easyai-server:3001
volumeMounts:
- name: pm2
mountPath: /app/.pm2
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: "1"
memory: 512Mi
volumes:
- name: pm2
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: easyai-asg
labels:
app.kubernetes.io/name: easyai-asg
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: easyai-asg
ports:
- name: http
port: 3003
targetPort: http
- name: tcp
port: 4003
targetPort: tcp
+133
View File
@@ -0,0 +1,133 @@
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
+77
View File
@@ -0,0 +1,77 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: easyai-web
labels:
app.kubernetes.io/name: easyai-web
spec:
replicas: 2
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: easyai-web
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app.kubernetes.io/name: easyai-web
spec:
serviceAccountName: easyai-workload
terminationGracePeriodSeconds: 30
containers:
- name: easyai-web
image: registry.cn-shanghai.aliyuncs.com/comfy-ai/one-ai:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 3010
envFrom:
- configMapRef:
name: easyai-app-config
- secretRef:
name: easyai-app-secret
env:
- name: NUXT_PUBLIC_BASE_SSRURL
value: http://easyai-server:3001
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: "1"
memory: 1500Mi
---
apiVersion: v1
kind: Service
metadata:
name: easyai-web
labels:
app.kubernetes.io/name: easyai-web
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: easyai-web
ports:
- name: http
port: 3010
targetPort: http
+15
View File
@@ -0,0 +1,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service-account.yaml
- easyai-web.yaml
- easyai-server.yaml
- ws-gateway.yaml
- video-edit.yaml
- sandbox.yaml
- easyai-asg.yaml
- agent-memory.yaml
commonLabels:
app.kubernetes.io/part-of: easyai
+139
View File
@@ -0,0 +1,139 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sandbox
labels:
app.kubernetes.io/name: sandbox
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: sandbox
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app.kubernetes.io/name: sandbox
spec:
serviceAccountName: easyai-workload
terminationGracePeriodSeconds: 30
containers:
- name: sandbox
image: registry.cn-shanghai.aliyuncs.com/easyaigc/sandbox:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 8000
- name: jupyter
containerPort: 8888
envFrom:
- configMapRef:
name: easyai-app-config
- secretRef:
name: easyai-app-secret
env:
- name: NODE_PATH
value: /app/node_modules:/app/node_modules_extra/node_modules
- name: NODE_MODULES_EXTRA
value: /app/node_modules_extra
- name: NODE_MODULES_EXTRA_PATH
value: /app/node_modules_extra/node_modules
- name: SANDBOX_TMPDIR
value: /app/tmp
- name: PIP_CACHE_DIR
value: /app/tmp/.pip
- name: TMPDIR
value: /app/tmp
- name: NPM_CONFIG_CACHE
value: /app/tmp/.npm
- name: PYTHON_EXTRA_DIR
value: /root/.local/lib/python3.12/site-packages
- name: PYTHON_EXTRA_PATH
value: /root/.local/lib/python3.12/site-packages
- name: JUPYTER_DATA_DIR
value: /app/tmp/jupyter_data
- name: JUPYTER_RUNTIME_DIR
value: /app/tmp/jupyter_runtime
- name: JUPYTER_CONFIG_DIR
value: /app/tmp/jupyter_config
- name: JUPYTER_TOKEN
valueFrom:
secretKeyRef:
name: easyai-app-secret
key: SANDBOX_JUPYTER_TOKEN
volumeMounts:
- name: data
mountPath: /app/data
- name: local-packages
mountPath: /app/local_packages
- name: python-packages
mountPath: /root/.local
- name: node-modules-extra
mountPath: /app/node_modules_extra
- name: app-tmp
mountPath: /app/tmp
- name: tmp
mountPath: /tmp
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 45
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: "1"
memory: 1Gi
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
volumes:
- name: data
emptyDir: {}
- name: local-packages
emptyDir: {}
- name: python-packages
emptyDir: {}
- name: node-modules-extra
emptyDir: {}
- name: app-tmp
emptyDir: {}
- name: tmp
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: sandbox
labels:
app.kubernetes.io/name: sandbox
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: sandbox
ports:
- name: http
port: 8000
targetPort: http
- name: jupyter
port: 8888
targetPort: jupyter
+6
View File
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: easyai-workload
labels:
app.kubernetes.io/name: easyai-workload
+97
View File
@@ -0,0 +1,97 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: video-edit
labels:
app.kubernetes.io/name: video-edit
spec:
replicas: 1
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: video-edit
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app.kubernetes.io/name: video-edit
spec:
serviceAccountName: easyai-workload
terminationGracePeriodSeconds: 60
containers:
- name: video-edit
image: registry.cn-shanghai.aliyuncs.com/easyaigc/videoedit:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 8000
envFrom:
- configMapRef:
name: easyai-app-config
- secretRef:
name: easyai-app-secret
env:
- name: PYTHONUNBUFFERED
value: "1"
- name: OMP_NUM_THREADS
value: "4"
- name: OPENBLAS_NUM_THREADS
value: "4"
volumeMounts:
- name: temp
mountPath: /app/temp
- name: dshm
mountPath: /dev/shm
readinessProbe:
httpGet:
path: /docs
port: http
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
livenessProbe:
httpGet:
path: /docs
port: http
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
resources:
requests:
cpu: "1"
memory: 2Gi
limits:
cpu: "2"
memory: 4Gi
securityContext:
capabilities:
add:
- SYS_ADMIN
volumes:
- name: temp
emptyDir: {}
- name: dshm
emptyDir:
medium: Memory
sizeLimit: 3Gi
---
apiVersion: v1
kind: Service
metadata:
name: video-edit
labels:
app.kubernetes.io/name: video-edit
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: video-edit
ports:
- name: http
port: 8000
targetPort: http
+107
View File
@@ -0,0 +1,107 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ws-gateway
labels:
app.kubernetes.io/name: ws-gateway
spec:
replicas: 2
revisionHistoryLimit: 3
selector:
matchLabels:
app.kubernetes.io/name: ws-gateway
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app.kubernetes.io/name: ws-gateway
spec:
serviceAccountName: easyai-workload
terminationGracePeriodSeconds: 45
containers:
- name: ws-gateway
image: registry.cn-shanghai.aliyuncs.com/easyaigc/wsgateway:latest
imagePullPolicy: Always
ports:
- name: websocket
containerPort: 3002
- name: tcp-events
containerPort: 4002
envFrom:
- configMapRef:
name: easyai-app-config
- secretRef:
name: easyai-app-secret
env:
- name: GATEWAY_CLUSTER_NODE_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: CONFIG_TCP_HOST
value: 0.0.0.0
- name: CONFIG_TCP_PORT
value: "4002"
- name: GATEWAY_INBOUND_ENABLED
value: "true"
- name: GATEWAY_INBOUND_TCP_HOST
value: easyai-server
- name: GATEWAY_INBOUND_TCP_PORT
value: "4001"
volumeMounts:
- name: pm2
mountPath: /app/.pm2
- name: tmp
mountPath: /tmp
readinessProbe:
tcpSocket:
port: websocket
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
livenessProbe:
tcpSocket:
port: websocket
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: "1"
memory: 512Mi
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
volumes:
- name: pm2
emptyDir: {}
- name: tmp
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: ws-gateway
labels:
app.kubernetes.io/name: ws-gateway
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: ws-gateway
ports:
- name: websocket
port: 3002
targetPort: websocket
- name: tcp-events
port: 4002
targetPort: tcp-events