---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: subsonic
  labels:
    app: subsonic
spec:
  replicas: 1
  selector:
    matchLabels:
      app: subsonic
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: subsonic
        version: v0.0.1
    spec:
      containers:
      - name: subsonic
        image: stuckj/subsonic:latest
        resources:
          requests:
            cpu: 500m
            memory: 600Mi
          limits:
            cpu: 1500m
            memory: 4000Mi
        env:
        - name: TZ
          value: Europe/Berlin
        - name: SUBSONIC_PORT
          value: "4040"
        - name: SUBSONIC_MAX_MEMORY
          value: "2048"
        ports:
        - containerPort: 4040
        volumeMounts:
          - name: subsonic-pv
            mountPath: /var/subsonic
          - name: music-data
            mountPath: /var/music
      volumes:
      - name: subsonic-pv
        persistentVolumeClaim:
          claimName: subsonic-pvc
      - name: music-data
        persistentVolumeClaim:
          claimName: subsonic-music-pvc