apiVersion: apps/v1
kind: Deployment
metadata:
  name: wavtool-live-update-deps
  namespace: production
  labels:
    app: wavtool-live-update-deps
spec:
  selector:
    matchLabels:
      app: wavtool-live-update-deps
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wavtool-live-update-deps
    spec:
      containers:
      - name: wavtool-live-update-deps
        imagePullPolicy: Always
        image: 035363416972.dkr.ecr.us-east-1.amazonaws.com/wavtool-server:$DEPLOY_TAG
        command:
          - /sbin/tini
          - node
          - ./built/src/live-update-deps.js
        env:
        - name: NODE_ENV
          value: "production"
        - name: SHUTDOWN_TIMEOUT
          value: "5"
        - name: RELEASE
          value: "$DEPLOY_RELEASE"
        - name: YT_DLP_STATE_DIR
          value: "/live-deps/yt-dlp"
        - name: YT_DLP_POLL_INTERVAL
          value: "300"
        resources:
          requests:
            cpu: 10m
            memory: 64Mi
        volumeMounts:
        - name: persistent-storage
          mountPath: /live-deps
          subPath: server_live_deps
      volumes:
      - name: persistent-storage
        persistentVolumeClaim:
          claimName: efs-claim