apiVersion: apps/v1
kind: Deployment
metadata:
  name: tdarr-server
  labels:
    app.kubernetes.io/controller: server
    app.kubernetes.io/instance: tdarr
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: tdarr
    helm.sh/chart: tdarr-5.0.1
  namespace: tdarr
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: server
      app.kubernetes.io/name: tdarr
      app.kubernetes.io/instance: tdarr
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: server
        app.kubernetes.io/instance: tdarr
        app.kubernetes.io/name: tdarr
    spec:
      enableServiceLinks: false
      serviceAccountName: tdarr
      automountServiceAccountToken: false
      securityContext:
        fsGroup: 1000
        fsGroupChangePolicy: OnRootMismatch
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: TZ
              value: America/Chicago
            - name: PUID
              value: "1001"
            - name: PGID
              value: "1001"
            - name: UMASK_SET
              value: "002"
            - name: ffmpegVersion
              value: "6"
            - name: internalNode
              value: "false"
            - name: inContainer
              value: "true"
            - name: nodeName
              value: tdarr-server
            - name: serverIP
              value: 0.0.0.0
            - name: serverPort
              value: "8266"
            - name: webUIPort
              value: "8265"
          image: ghcr.io/haveagitgat/tdarr:2.75.01@sha256:d691b283d6498bb43b48753c24d176fc6a849012c33f3518f16394d93d6b6359
          name: main
          resources:
            requests:
              cpu: 500m
              memory: 2Gi
          volumeMounts:
            - mountPath: /app/configs
              name: config
            - mountPath: /mnt/store
              name: media
              readOnly: true
            - mountPath: /app/server
              name: server
            - mountPath: /tcache
              name: server-cache
      volumes:
        - name: config
          persistentVolumeClaim:
            claimName: tdarr-config
        - name: media
          persistentVolumeClaim:
            claimName: tdarr-nfs-storage
        - name: server
          persistentVolumeClaim:
            claimName: tdarr-server
        - emptyDir: {}
          name: server-cache
