apiVersion: apps/v1
kind: Deployment
metadata:
  name: lidatube
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: lidatube
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: lidatube
    helm.sh/chart: lidatube-4.6.2
  namespace: lidatube
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: lidatube
      app.kubernetes.io/instance: lidatube
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: lidatube
        app.kubernetes.io/name: lidatube
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      securityContext:
        fsGroup: 1000
        fsGroupChangePolicy: OnRootMismatch
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: PUID
              value: "1000"
            - name: PGID
              value: "1000"
            - name: lidarr_address
              value: http://lidarr.lidarr:80
            - name: lidarr_api_key
              valueFrom:
                secretKeyRef:
                  key: lidarr_api_key
                  name: lidatube-secret
            - name: sleep_interval
              value: "360"
            - name: sync_schedule
              value: "4"
            - name: attempt_lidarr_import
              value: "true"
          image: thewicklowwolf/lidatube:0.2.42
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            requests:
              cpu: 10m
              memory: 128Mi
          volumeMounts:
            - mountPath: /lidatube/config
              name: config
            - mountPath: /lidatube/downloads
              name: music
      volumes:
        - name: config
          persistentVolumeClaim:
            claimName: lidatube-config
        - name: music
          persistentVolumeClaim:
            claimName: lidatube-nfs-storage
