yt-dlp now feeds mood discovery. Queries come from the free-text hint, seed artists and genres; they run in parallel, are filtered to music-length videos, matched against library songs by normalized title and artist, scored, and stored as review candidates. Refresh, accept and reject endpoints are added: accepting a library match adds a seed immediately, while accepted tracks that are not owned wait for the future downloader. Decisions survive refreshes and stale undecided candidates are pruned. A background pass refreshes stale moods every hour, and the image ships a pinned yt-dlp binary (YTDLP_PATH, also added to the Nix shell and chart). Radio now avoids tracks played in the last 7 days when the pool is large enough, spaces artists and albums across a batch, and weighs skips three times as heavily as completions. The chart moves to 0.2.2.
122 lines
3.8 KiB
YAML
122 lines
3.8 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
|
|
{{- 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 }}
|
|
readOnly: true
|
|
- 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 }}
|