apiVersion: apps/v1 kind: Deployment metadata: name: pipeline namespace: pipeline labels: app.kubernetes.io/name: pipeline spec: # Keep at 1. The WebUI stores jobs in a local file and renders by spawning the # CLI child process; there is no shared state or distributed locking, so extra # replicas would each see a private jobs.json and could double-run jobs. replicas: 1 strategy: type: Recreate # RWO PVCs can't move while the old pod owns them selector: matchLabels: app.kubernetes.io/name: pipeline template: metadata: labels: app.kubernetes.io/name: pipeline spec: securityContext: runAsNonRoot: true runAsUser: 1000 # `node` user baked into the image runAsGroup: 1000 fsGroup: 1000 # chowns mounted PVCs so uid 1000 can write them # Uncomment once you've created the Harbor pull secret (see README). # imagePullSecrets: # - name: harbor-creds containers: - name: pipeline # ⚠️ Replace with your Harbor registry + project. See README. image: harbor.corp.shuidi.tech/library/pipeline:latest imagePullPolicy: IfNotPresent ports: - name: http containerPort: 3000 envFrom: - configMapRef: name: pipeline-env - secretRef: name: pipeline-env-secret # Let in-flight renders finish on rolling update / drain. A long # render still exceeds this; interrupted jobs are auto-marked failed # on the next pod start (startup sweep in job-store). terminationGracePeriodSeconds: 60 startupProbe: httpGet: path: /api/health/live port: http failureThreshold: 30 periodSeconds: 10 livenessProbe: httpGet: path: /api/health/live port: http initialDelaySeconds: 10 periodSeconds: 30 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /api/health/ready port: http initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 5 # Video rendering (Remotion/Chrome + ffmpeg) is CPU/memory heavy. # Tune to your cluster. resources: requests: cpu: "1000m" memory: 2Gi limits: cpu: "4000m" memory: 6Gi volumeMounts: - name: output mountPath: /app/output - name: jobs mountPath: /app/jobs volumes: - name: output persistentVolumeClaim: claimName: pipeline-output - name: jobs persistentVolumeClaim: claimName: pipeline-jobs