Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2023-11-14 11:30:46 +01:00
parent bd347013f6
commit 0bb6460f76
3 changed files with 170 additions and 0 deletions

View File

@ -0,0 +1,35 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: smb-music
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: smb-music
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: smb-oldmusic
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: smb-oldmusic
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: logitech-media-server-config
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: local-path

View File

@ -0,0 +1,33 @@
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: logitech-media-server
annotations:
external-dns.alpha.kubernetes.io/hostname: lms.martyn.berlin
name: lms
spec:
ports:
- port: 80
targetPort: 9000
name: web
- port: 9000
targetPort: 9000
name: alsoweb
- port: 3483
targetPort: 3483
name: sumthing
- port: 9090
targetPort: 9090
name: api
- name: discovery
port: 3483
protocol: UDP
targetPort: discovery
- name: spottydiscovery
port: 5353
protocol: UDP
targetPort: 5353
selector:
app.kubernetes.io/name: logitech-media-server
type: LoadBalancer

View File

@ -0,0 +1,102 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app.kubernetes.io/name: logitech-media-server
name: logitech-media-server
namespace: lms
spec:
podManagementPolicy: OrderedReady
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: logitech-media-server
serviceName: logitech-media-server
template:
metadata:
labels:
app.kubernetes.io/name: logitech-media-server
spec:
containers:
- image: doliana/logitech-media-server:2021_11_06-8.2.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 10
httpGet:
path: /
port: http
scheme: HTTP
initialDelaySeconds: 90
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
name: logitech-media-server
ports:
- containerPort: 9000
name: http
protocol: TCP
- containerPort: 9090
name: cli
protocol: TCP
- containerPort: 3483
name: control
protocol: TCP
- containerPort: 3483
name: discovery
protocol: UDP
- containerPort: 5353
name: spottydiscovery
protocol: UDP
readinessProbe:
failureThreshold: 5
httpGet:
path: /
port: http
scheme: HTTP
initialDelaySeconds: 2
periodSeconds: 2
successThreshold: 1
timeoutSeconds: 1
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /srv/squeezebox
name: config
subPath: config
- mountPath: /smbmusic
name: smbmusic
- mountPath: /smboldmusic
name: smboldmusic
dnsPolicy: ClusterFirst
initContainers:
- command:
- sh
- -c
- mkdir /smbmusic; mkdir -pv /config/playlists /config/config; chown -Rc 1000:1000
/config
image: doliana/logitech-media-server:2023_04_15-8.3.1
imagePullPolicy: IfNotPresent
name: init-config
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /config
name: config
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- name: config
persistentVolumeClaim:
claimName: logitech-media-server-config
- name: smbmusic
persistentVolumeClaim:
claimName: smb-music
- name: smboldmusic
persistentVolumeClaim:
claimName: smb-oldmusic
updateStrategy:
rollingUpdate:
partition: 0
type: RollingUpdate