From b7b458885a2db8e692d57d247b6131560f6c701f Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Sun, 10 Nov 2024 18:56:04 -0500 Subject: [PATCH] Add navidrome --- cluster/navidrome/navidrome-data-pvc.yaml | 12 ++++ cluster/navidrome/navidrome-deployment.yaml | 79 +++++++++++++++++++++ cluster/navidrome/navidrome-music-pv.yaml | 12 ++++ cluster/navidrome/navidrome-music-pvc.yaml | 11 +++ cluster/navidrome/navidrome-service.yaml | 13 ++++ 5 files changed, 127 insertions(+) create mode 100644 cluster/navidrome/navidrome-data-pvc.yaml create mode 100644 cluster/navidrome/navidrome-deployment.yaml create mode 100644 cluster/navidrome/navidrome-music-pv.yaml create mode 100644 cluster/navidrome/navidrome-music-pvc.yaml create mode 100644 cluster/navidrome/navidrome-service.yaml diff --git a/cluster/navidrome/navidrome-data-pvc.yaml b/cluster/navidrome/navidrome-data-pvc.yaml new file mode 100644 index 0000000..d92028f --- /dev/null +++ b/cluster/navidrome/navidrome-data-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: navidrome-data-pvc +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 16Gi + diff --git a/cluster/navidrome/navidrome-deployment.yaml b/cluster/navidrome/navidrome-deployment.yaml new file mode 100644 index 0000000..e051ba8 --- /dev/null +++ b/cluster/navidrome/navidrome-deployment.yaml @@ -0,0 +1,79 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: navidrome +spec: + selector: + matchLabels: + app: navidrome + template: + metadata: + labels: + app: navidrome + spec: + securityContext: + fsGroup: 1000 + containers: + - name: navidrome + image: deluan/navidrome:latest + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + ports: + - containerPort: 4533 + env: + - name: ND_BASEURL + value: "https://music.clortox.com" + - name: ND_CACHEFOLDER + value: "/cache" + - name: ND_MUSICFOLDER + value: "/music" + - name: ND_DATAFOLDER + value: "/data" + + - name: ND_SCANSCHEDULE + value: "1h" + - name: ND_LOGLEVEL + value: "info" + - name: ND_SESSIONTIMEOUT + value: "24h" + + - name: ND_ENABLESHARING + value: "true" + - name: ND_UILOGINBACKGROUNDURL + value: "https://general.api.clortox.com/images/background/today" + - name: ND_UIWELCOMEMESSAGE + value: "Lol. Lmao even" + + #- name: ND_REVERSEPROXYUSERHEADER + # value: "X-Authentik-Username" + #- name: ND_REVERSEPROXYWHITELIST + # value: "0.0.0.0/0" + #- name: ND_SPOTIFY_ID + # valueFrom: + # secretKeyRef: + # name: spotify-creds + # key: CLIENT_ID + #- name: ND_SPOTIFY_SECRET + # valueFrom: + # secretKeyRef: + # name: spotify-creds + # key: CLIENT_ID + volumeMounts: + - name: data + mountPath: "/data" + - name: music + mountPath: "/music" + readOnly: true + - name: cache + mountPath: "/cache" + volumes: + - name: data + persistentVolumeClaim: + claimName: navidrome-data-pvc + - name: music + persistentVolumeClaim: + claimName: navidrome-music-pvc + - name: cache + emptyDir: {} + diff --git a/cluster/navidrome/navidrome-music-pv.yaml b/cluster/navidrome/navidrome-music-pv.yaml new file mode 100644 index 0000000..55b359f --- /dev/null +++ b/cluster/navidrome/navidrome-music-pv.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: navidrome-music-pv +spec: + capacity: + storage: 2000Gi + accessModes: + - ReadWriteMany + nfs: + path: /volume1/tank/media/music + server: 10.0.3.5 diff --git a/cluster/navidrome/navidrome-music-pvc.yaml b/cluster/navidrome/navidrome-music-pvc.yaml new file mode 100644 index 0000000..be82204 --- /dev/null +++ b/cluster/navidrome/navidrome-music-pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: navidrome-music-pvc +spec: + accessModes: + - ReadWriteMany + storageClassName: "" + resources: + requests: + storage: 2000Gi diff --git a/cluster/navidrome/navidrome-service.yaml b/cluster/navidrome/navidrome-service.yaml new file mode 100644 index 0000000..25ff1da --- /dev/null +++ b/cluster/navidrome/navidrome-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: navidrome-services +spec: + type: LoadBalancer + ports: + - port: 80 + targetPort: 4533 + protocol: TCP + selector: + app: navidrome +