Files
AudioManager/charts/audiomanager/templates/deployment.yaml
T
TapTap 44b75c4d4d
CI / chart (push) Successful in 3s
CI / test (push) Successful in 2m20s
CI / chart-push (push) Successful in 6s
CI / image (push) Successful in 3m39s
feat: accept, store and expose client diagnostics
- V11 client_logs table with per-user storage and retention/pruning
- POST/GET/DELETE /logs with batch validation, rate limit and admin access
- redact bearer tokens, Authorization headers and query/JSON secrets twice
- add X-Request-Id to responses and include it in the server log pattern
- report client error entries immediately in the server log
- scripts/logs.sh for source-side retrieval and clearing
- chart knobs CLIENT_LOG_RETENTION_DAYS and CLIENT_LOG_MAX_ROWS_PER_USER
2026-11-20 13:43:05 +00:00

137 lines
4.6 KiB
YAML

{{- if not (has .Values.defaultSource (list "deezer" "youtube")) }}
{{- fail "defaultSource must be deezer or youtube" }}
{{- end }}
{{- if not (has (int .Values.deezer.quality) (list 0 1)) }}
{{- fail "deezer.quality must be 0 (128 kbps) or 1 (320 kbps)" }}
{{- end }}
{{- if and .Values.deezer.arl .Values.deezer.existingSecret }}
{{- fail "set only one of deezer.arl and deezer.existingSecret" }}
{{- end }}
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 }}
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: MEDIA_DIR
value: /data/media
- name: DOWNLOAD_DIR
value: /data/downloads
- name: USERS_FILE
value: /etc/audiomanager/users.yaml
- name: FFMPEG_PATH
value: ffmpeg
- name: YTDLP_PATH
value: yt-dlp
- name: STREAMRIP_PATH
value: rip
- name: DEFAULT_SOURCE
value: {{ .Values.defaultSource | quote }}
- name: DEEZER_QUALITY
value: {{ .Values.deezer.quality | quote }}
- name: DEEZER_API_BASE
value: {{ .Values.deezer.apiBase | quote }}
- name: LOUDNESS_ENABLED
value: {{ .Values.loudness.enabled | quote }}
- name: LOUDNESS_TARGET_LUFS
value: {{ .Values.loudness.targetLufs | quote }}
- name: CLIENT_LOG_RETENTION_DAYS
value: {{ .Values.clientLogs.retentionDays | quote }}
- name: CLIENT_LOG_MAX_ROWS_PER_USER
value: {{ .Values.clientLogs.maxRowsPerUser | quote }}
{{- if .Values.deezer.existingSecret }}
- name: DEEZER_ARL
valueFrom:
secretKeyRef:
name: {{ .Values.deezer.existingSecret }}
key: {{ .Values.deezer.key }}
optional: true
{{- else if .Values.deezer.arl }}
- name: DEEZER_ARL
value: {{ .Values.deezer.arl | 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: users
mountPath: /etc/audiomanager/users.yaml
subPath: {{ .Values.users.key }}
readOnly: true
- name: data
mountPath: /data
- name: tmp
mountPath: /tmp
volumes:
- 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: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}