Skip to content

Instantly share code, notes, and snippets.

@jelmer
Created January 7, 2022 01:17
Show Gist options
  • Save jelmer/20c0c518c125efa256f7fd9f33f3c707 to your computer and use it in GitHub Desktop.
Save jelmer/20c0c518c125efa256f7fd9f33f3c707 to your computer and use it in GitHub Desktop.
Navidrome k8s configuration
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: navidrome
spec:
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
replicas: 1
selector:
matchLabels:
app: navidrome
template:
metadata:
labels:
app: navidrome
spec:
containers:
- name: navidrome
image: deluan/navidrome:latest
imagePullPolicy: Always
resources:
limits:
cpu: ".5"
memory: "2Gi"
requests:
cpu: "0.1"
memory: "10M"
ports:
- containerPort: 4533
volumeMounts:
- name: navidrome-data-volume
mountPath: /data
- name: navidrome-music-volume
mountPath: /music
env:
- name: ND_SCANSCHEDULE
value: 1h
- name: ND_LOGLEVEL
value: info
- name: ND_SESSIONTIMEOUT
value: 24h
- name: ND_BASEURL
value: /navidrome
livenessProbe:
httpGet:
path: /navidrome/app
port: 4533
initialDelaySeconds: 30
periodSeconds: 3
timeoutSeconds: 90
volumes:
- name: navidrome-data-volume
hostPath:
path: /srv/navidrome
type: Directory
- name: navidrome-music-volume
hostPath:
path: /srv/media/music
type: Directory
---
apiVersion: v1
kind: Service
metadata:
name: navidrome
spec:
ports:
- port: 4533
selector:
app: navidrome
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: navidrome
spec:
ingressClassName: nginx
rules:
- host: example.com
http:
paths:
- backend:
service:
name: navidrome
port:
number: 4533
path: /navidrome(/|$)(.*)
pathType: Prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment