apiVersion: apps/v1
kind: Deployment
metadata:
  name: tunedrop
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tunedrop
  template:
    metadata:
      labels:
        app: tunedrop
    spec:
      containers:
        - name: tunedrop
          image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.tag }}"
          imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
          env:
            - name: MUSIC_DIR
              value: {{ .Values.env.MUSIC_DIR | quote }}
            - name: NAVIDROME_SCAN_URL
              value: {{ .Values.env.NAVIDROME_SCAN_URL | quote }}
          volumeMounts:
            - name: music
              mountPath: {{ .Values.persistence.mountPath }}
      volumes:
        - name: music
          persistentVolumeClaim:
            claimName: tunedrop-pvc