apiVersion: apps/v1 kind: Deployment metadata: name: airlabs-manage-backend labels: app: airlabs-manage-backend spec: replicas: 1 selector: matchLabels: app: airlabs-manage-backend template: metadata: labels: app: airlabs-manage-backend spec: imagePullSecrets: - name: cr-pull-secret containers: - name: airlabs-manage-backend image: ${CI_REGISTRY_IMAGE}/backend:latest imagePullPolicy: Always ports: - containerPort: 8000 env: # Database - name: DB_HOST value: "mysql8351f937d637.rds.ivolces.com" - name: DB_NAME value: "airlabs_manage" - name: DB_USER value: "zyc" - name: DB_PASSWORD value: "Zyc188208" - name: DB_PORT value: "3306" # JWT 密钥 - name: SECRET_KEY value: "Ui5-xEvtAhKRDtlXKzDfd7TElsVZFUhakff0qcjn8jU" # CORS 允许的域名 - name: CORS_ORIGINS value: "https://airlabs-manage-web.airlabs.art" livenessProbe: tcpSocket: port: 8000 initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 3 failureThreshold: 3 readinessProbe: tcpSocket: port: 8000 initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3 resources: requests: memory: "256Mi" cpu: "250m" limits: memory: "1024Mi" cpu: "1000m" --- apiVersion: v1 kind: Service metadata: name: airlabs-manage-backend spec: selector: app: airlabs-manage-backend ports: - protocol: TCP port: 8000 targetPort: 8000