diff --git a/navidrome/navidrome-data.yaml b/navidrome/navidrome-data.yaml new file mode 100644 index 0000000..cc2b2a3 --- /dev/null +++ b/navidrome/navidrome-data.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: navidrome-pvc-data + namespace: navidrome-ns +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 16Gi diff --git a/navidrome/navidrome-deployment.yaml b/navidrome/navidrome-deployment.yaml new file mode 100644 index 0000000..b6445f5 --- /dev/null +++ b/navidrome/navidrome-deployment.yaml @@ -0,0 +1,81 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: navidrome + namespace: navidrome-ns +spec: + selector: + matchLabels: + app: navidrome + template: + metadata: + labels: + app: navidrome + spec: + nodeSelector: + kubernetes.io/hostname: gluttony + 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-pvc-data + - name: music + persistentVolumeClaim: + claimName: navidrome-pvc-music + - name: cache + emptyDir: {} diff --git a/navidrome/navidrome-pv-music.yaml b/navidrome/navidrome-pv-music.yaml new file mode 100644 index 0000000..16a7294 --- /dev/null +++ b/navidrome/navidrome-pv-music.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: navidrome-pv-music + namespace: navidrome-ns +spec: + storageClassName: local-storage + capacity: + storage: 18000Gi + accessModes: + - ReadWriteMany + hostPath: + path: "/Main/Media" + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - gluttony diff --git a/navidrome/navidrome-pvc-music.yaml b/navidrome/navidrome-pvc-music.yaml new file mode 100644 index 0000000..d6dc488 --- /dev/null +++ b/navidrome/navidrome-pvc-music.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: navidrome-pvc-music + namespace: navidrome-ns +spec: + volumeName: navidrome-pv-music + storageClassName: local-storage + accessModes: + - ReadWriteMany + resources: + requests: + storage: 18000Gi diff --git a/navidrome/navidrome-service.yaml b/navidrome/navidrome-service.yaml new file mode 100644 index 0000000..2f7f829 --- /dev/null +++ b/navidrome/navidrome-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: navidrome-services + namespace: navidrome-ns +spec: + type: LoadBalancer + ports: + - port: 80 + targetPort: 4533 + protocol: TCP + selector: + app: navidrome diff --git a/navidrome/sealed-secret.yaml b/navidrome/sealed-secret.yaml new file mode 100644 index 0000000..4d943c1 --- /dev/null +++ b/navidrome/sealed-secret.yaml @@ -0,0 +1,15 @@ +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: spotify-creds + namespace: navidrome-ns +spec: + encryptedData: + CLIENT_ID: AgDCmOhoW/hW2ySB8S1EvNVHZxa/Kcp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8/NDP4MqrV7cW+1DQYFr1t6Aey4xnRQZ3k85kxBB0e71wgBuJkoNqRsWpjegW4HkgZNHw4qrkqX1tg7hQbVTdWh0qaOb5P39TeumALlLvgGyuVZrXqOTyY6A0ExqIgF37NmelbSQdZ15g2glvrXJiWzZPRTlHhf/eLVnCRgS/2oBQbmTPVfLbt5BqPbXBjhRIpe/upAvNaIQMPu0ll8sXBBVtMI+TbVFNKD1LXh3XBoxs6ORaQfRWctKmLa9fDj/KMJwS56yf/TlVLyq7W3+Ko1JxsfvpMUAxijb8+M3bL+2GyidFcACXunAKlNc6aYzDAJOz95oi7Y01V7xJwCgk+okplmZskZEbhMnkvgQyzCSoNTaufbFTrzPrz3fKsAwyUT4a5YmuA== + template: + metadata: + creationTimestamp: null + name: spotify-creds + namespace: navidrome-ns