Decision. Scheduled transcode passes
Alternative. Keeping high-bitrate originals everywhere
Why. Disk budget on arm64 nodes is small; transcode optimisation is the cheapest way to keep the library growing.
Transcodes and optimises the library so files play efficiently on every device
Tdarr walks the library and transcodes files to keep sizes sane on small disks, using the media node CPU on a schedule.
templates/tdarr/tdarr-rollout.yaml Tdarr Rollout
{{- $projectName := .Values.global.projectName -}}
{{- $imagePullSecretsName := .Values.global.imagePullSecretsName -}}
{{- $hostMediaMountPath := .Values.global.hostMediaMountPath -}}
{{- $configBasePath := .Values.global.configBasePath -}}
{{- $timeZone := .Values.global.timeZone -}}
{{- $userID := .Values.global.userID -}}
{{- $seriesMount := .Values.applications.sonarr.mediaMount -}}
{{- $moviesMount := .Values.applications.radarr.mediaMount -}}
{{- with .Values.applications.tdarr }}
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: {{ .name }}
namespace: {{ $projectName }}
spec:
replicas: 1
strategy:
canary:
maxSurge: 0
maxUnavailable: 1
steps:
- setWeight: 100
selector:
matchLabels:
app: {{ .name }}
template:
metadata:
labels:
app: {{ .name }}
spec:
{{- include "media-systems.nodePlacement" $ | nindent 6 }}
serviceAccount: {{ $projectName }}-service-account
serviceAccountName: {{ $projectName }}-service-account
automountServiceAccountToken: true
containers:
- name: {{ .name }}
image: {{ .image }}
imagePullPolicy: IfNotPresent
ports:
- name: {{ .name | substr 0 9 }}-http
containerPort: {{ .ports.http }}
protocol: TCP
- name: {{ .name }}-server
containerPort: {{ .ports.server }}
protocol: TCP
env:
- name: PGID
value: {{ $userID | quote }}
- name: PUID
value: {{ $userID | quote }}
- name: TZ
value: {{ $timeZone | quote }}
- name: UMASK_SET
value: "002"
- name: serverIP
value: "0.0.0.0"
- name: serverPort
value: {{ .ports.server | quote }}
- name: webUIPort
value: {{ .ports.http | quote }}
- name: internalNode
value: "true"
- name: inContainer
value: "true"
- name: ffmpegVersion
value: "6"
- name: tdarr-node
value: "6"
volumeMounts:
- name: {{ .name }}-app
mountPath: {{ .configMount }}
- name: {{ .name }}-app
mountPath: {{ .serverMount }}
- name: {{ .name }}-app
mountPath: {{ .logsMount }}
- name: {{ .name }}-movies
mountPath: {{ $moviesMount }}/movies
- name: {{ .name }}-series
mountPath: {{ $seriesMount }}/series
- name: {{ .name }}-cache
mountPath: {{ .cacheMount }}
resources: {}
securityContext:
runAsUser: 0
privileged: true
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
volumes:
- name: {{ .name }}-app
hostPath:
path: {{ $configBasePath }}/{{ .name }}
type: DirectoryOrCreate
- name: {{ .name }}-movies
hostPath:
path: {{ $hostMediaMountPath }}/movies
type: Directory
- name: {{ .name }}-series
hostPath:
path: {{ $hostMediaMountPath }}/series
type: Directory
- name: {{ .name }}-cache
hostPath:
path: {{ $hostMediaMountPath }}/cache
type: Directory
{{- end -}} Decision. Scheduled transcode passes
Alternative. Keeping high-bitrate originals everywhere
Why. Disk budget on arm64 nodes is small; transcode optimisation is the cheapest way to keep the library growing.