Files
AudioManager/charts/audiomanager/templates/deployment.yaml
T
TapTap a5af1ee83f
CI / chart (push) Successful in 4s
CI / chart-push (push) Successful in 4s
CI / test (push) Successful in 2m5s
CI / image (push) Successful in 3m14s
feat: download accepted recommendations and track longform progress
Accepted recommendations without a library match now enter a download queue.
A worker downloads the MP3 with yt-dlp into "<music>/AudioManager Imports",
runs a scan, matches the new song, links it to the recommendation and adds it
as a seed. Jobs retry three times and expose queued/downloading/done/failed
state (plus the error) on the recommendation DTO, so clients can show progress
and retry. Downloads can be disabled and the target folder chosen.

Long-form gets resume points: GET/PUT /longform/progress, scoped to longform
folders and to the owner, with automatic completion detection. Longform stays
excluded from moods and radio.

The chart mounts the music hostPath writable for imports and passes the new
DOWNLOAD_* settings; version 0.2.3.
2026-11-15 13:26:22 +00:00

129 lines
4.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "audiomanager.fullname" . }}
namespace: {{ include "audiomanager.namespace" . }}
labels:
{{- include "audiomanager.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
type: Recreate
selector:
matchLabels:
{{- include "audiomanager.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "audiomanager.selectorLabels" . | nindent 8 }}
annotations:
checksum/library: {{ include (print $.Template.BasePath "/configmap-library.yaml") . | sha256sum }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: audiomanager
image: "{{ include "audiomanager.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
env:
- name: PORT
value: "8080"
- name: DATA_DIR
value: /data
- name: LIBRARY_CONFIG
value: /etc/audiomanager/library.yaml
- name: USERS_FILE
value: /etc/audiomanager/users.yaml
- name: FFMPEG_PATH
value: ffmpeg
- name: YTDLP_PATH
value: yt-dlp
- name: DOWNLOADS_ENABLED
value: {{ .Values.downloads.enabled | quote }}
- name: DOWNLOAD_DIR
value: /data/downloads
{{- with .Values.downloads.folderId }}
- name: DOWNLOAD_FOLDER_ID
value: {{ . | quote }}
{{- end }}
{{- with .Values.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 8080
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 10
periodSeconds: 20
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 5
periodSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: library
mountPath: /etc/audiomanager/library.yaml
subPath: library.yaml
readOnly: true
- name: users
mountPath: /etc/audiomanager/users.yaml
subPath: {{ .Values.users.key }}
readOnly: true
- name: data
mountPath: /data
- name: tmp
mountPath: /tmp
- name: music
mountPath: {{ .Values.media.music.mountPath }}
- name: longform
mountPath: {{ .Values.media.longform.mountPath }}
readOnly: true
volumes:
- name: library
configMap:
name: {{ include "audiomanager.fullname" . }}-library
- name: users
secret:
secretName: {{ required "users.existingSecret is required" .Values.users.existingSecret }}
- name: data
{{- if .Values.data.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "audiomanager.fullname" . }}-data
{{- else }}
emptyDir: {}
{{- end }}
- name: tmp
emptyDir: {}
- name: music
hostPath:
path: {{ .Values.media.music.hostPath }}
type: Directory
- name: longform
hostPath:
path: {{ .Values.media.longform.hostPath }}
type: Directory
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}