apiVersion: apps/v1
kind: Deployment
metadata:
  name: navidrome-main
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: navidrome
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: navidrome
    helm.sh/chart: navidrome-4.5.0
  namespace: navidrome
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: navidrome
      app.kubernetes.io/instance: navidrome
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: navidrome
        app.kubernetes.io/name: navidrome
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - env:
            - name: ND_MUSICFOLDER
              value: /music
            - name: ND_DATAFOLDER
              value: /data
            - name: ND_CACHEFOLDER
              value: /cache
            - name: ND_BASEURL
              value: https://navidrome.alexlebens.net
            - name: ND_ENABLEINSIGHTSCOLLECTOR
              value: "false"
            - name: ND_PROMETHEUS_ENABLED
              value: "true"
          image: deluan/navidrome:0.59.0@sha256:4edc8a1de3e042f30b78a478325839f4395177eb8201c27543dccc0eba674f23
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            limits:
              gpu.intel.com/i915: 1
            requests:
              cpu: 10m
              gpu.intel.com/i915: 1
              memory: 128Mi
          volumeMounts:
            - mountPath: /cache
              name: cache
            - mountPath: /data
              name: data
            - mountPath: /music
              name: music
              readOnly: true
      volumes:
        - emptyDir: {}
          name: cache
        - name: data
          persistentVolumeClaim:
            claimName: navidrome-data
        - name: music
          persistentVolumeClaim:
            claimName: navidrome-music-nfs-storage
