Files
easyai-deploy/k8s/base/video-edit.yaml
T
2026-07-09 19:29:46 +08:00

98 lines
2.3 KiB
YAML

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