refine snapcast deployment so piping between containers works

This commit is contained in:
2025-12-20 18:02:07 +01:00
parent 8c7b532a31
commit 7f3b3ff48e
4 changed files with 38 additions and 22 deletions

7
apps/snapcast/README.md Normal file
View File

@@ -0,0 +1,7 @@
### Credentials
Since this tries to run in an isolated network we can't rely on autodiscover and the spotify client needs to be tied to an account.
This is achieved by registering the client on startup via oauth. The logs show an url which should be copied to a local browser. The successfull redirect needs to be forwarded back to the client, hence run:
```
k port-forward deployments/snapcast 5588:5588
```

View File

@@ -51,9 +51,20 @@ spec:
- name: TZ
value: Europe/Berlin
- name: AIRPLAY_CONFIG_ENABLED
value: "0"
value: "1"
- name: SPOTIFY_CONFIG_ENABLED
value: "0"
- name: PIPE_CONFIG_ENABLED
value: "1"
- name: PIPE_PATH
value: /mnt/pipe/spotipipe
- name: PIPE_SOURCE_NAME
value: "Librespot"
# - name: PIPE_MODE
# value: "read"
- name: PIPE_EXTRA_ARGS
# see https://github.com/badaix/snapcast/issues/1248
value: "&sampleformat=44100:16:2"
volumeMounts:
- name: pipe
mountPath: /mnt/pipe
@@ -68,34 +79,31 @@ spec:
requests:
memory: "128Mi"
cpu: "250m"
# ports:
ports:
- containerPort: 5588 # default port for oauth callback
env:
- name: BACKEND
value: pipe
- name: DEVICE
value: /mnt/pipe/spotipipe
- name: DISABLE_DISCOVERY
value: Y
- name: AUTOPLAY
value: Y
# - name: VERBOSE
# value: Y
# - name: PASSTHROUGH
# value: Y
- name: ADDITIONAL_ARGUMENTS
value: "--enable-oauth --cache /cache"
volumeMounts:
- name: pipe
mountPath: /mnt/pipe
- name: credentials-cache
mountPath: /cache
volumes:
- name: pipe
emptyDir: {}
# - name: SPOTIFY_ACCESS_TOKEN
# value: BQBxGPPPXZTXF7WTBzJItu3KNkeoZu2j2-Rlk1RmtnmXvzPh1fWFpOT2VeXwWxMJXlBYwxSOTo1ZKk3hAr08OhDhbQChi6KDl6qEmK-Y8Wq8g3EoP7M-oRnHt4WFMg1zC1C37t90nQUKZ-F9UdSuL9A6Ny6V6pYsai1bUspOU0q5UHn6-Dv9E8gwEKXOPMlBKEXNi1D0sT2m9rzwI7UK1g7ToRPn03eqGe41RRvlfrSCgf41tg
# - name: SPOTIFY_EXTRA_ARGS
# value: " --disable-discovery --access-token BQBxGPPPXZTXF7WTBzJItu3KNkeoZu2j2-Rlk1RmtnmXvzPh1fWFpOT2VeXwWxMJXlBYwxSOTo1ZKk3hAr08OhDhbQChi6KDl6qEmK-Y8Wq8g3EoP7M-oRnHt4WFMg1zC1C37t90nQUKZ-F9UdSuL9A6Ny6V6pYsai1bUspOU0q5UHn6-Dv9E8gwEKXOPMlBKEXNi1D0sT2m9rzwI7UK1g7ToRPn03eqGe41RRvlfrSCgf41tg"
# volumeMounts:
# - name: config
# mountPath: /config
# - name: snapserver-config
# mountPath: /root/.config/
# volumes:
# - name: config
# secret:
# secretName: snapcast-config
# - name: snapserver-config
# emptyDir: {}
- name: credentials-cache
persistentVolumeClaim:
claimName: cache

View File

@@ -7,6 +7,7 @@ resources:
- namespace.yaml
- deployment.yaml
- service.yaml
- pvc.yaml
- snapcast-config.secret.yaml
images:

View File

@@ -1,7 +1,7 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: data
name: cache
spec:
storageClassName: "nfs-client"
accessModes: