From 562930e164b2c8c439de9d0de55e12124cc00ff1 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Mon, 29 Dec 2025 16:57:15 -0600 Subject: [PATCH] add ytdl-sub --- clusters/cl01tl/helm/ytdl-sub/Chart.yaml | 22 ++++ .../templates/persistent-volume-claim.yaml | 17 +++ .../ytdl-sub/templates/persistent-volume.yaml | 23 ++++ clusters/cl01tl/helm/ytdl-sub/values.yaml | 100 ++++++++++++++++++ 4 files changed, 162 insertions(+) create mode 100644 clusters/cl01tl/helm/ytdl-sub/Chart.yaml create mode 100644 clusters/cl01tl/helm/ytdl-sub/templates/persistent-volume-claim.yaml create mode 100644 clusters/cl01tl/helm/ytdl-sub/templates/persistent-volume.yaml create mode 100644 clusters/cl01tl/helm/ytdl-sub/values.yaml diff --git a/clusters/cl01tl/helm/ytdl-sub/Chart.yaml b/clusters/cl01tl/helm/ytdl-sub/Chart.yaml new file mode 100644 index 000000000..e9752c6b9 --- /dev/null +++ b/clusters/cl01tl/helm/ytdl-sub/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v2 +name: ytdl-sub +version: 1.0.0 +description: ytdl-sub +keywords: + - ytdl-sub + - music + - youtube +home: https://wiki.alexlebens.dev/s/ +sources: + - https://github.com/jmbannon/ytdl-sub + - https://github.com/jmbannon/ytdl-sub/pkgs/container/ytdl-sub + - https://github.com/bjw-s-labs/helm-charts/tree/main/charts/other/app-template +maintainers: + - name: alexlebens +dependencies: + - name: app-template + alias: ytdl-sub + repository: https://bjw-s-labs.github.io/helm-charts/ + version: 4.5.0 +# renovate: github=jmbannon/ytdl-sub +appVersion: 2025.12.26 diff --git a/clusters/cl01tl/helm/ytdl-sub/templates/persistent-volume-claim.yaml b/clusters/cl01tl/helm/ytdl-sub/templates/persistent-volume-claim.yaml new file mode 100644 index 000000000..c225aeda1 --- /dev/null +++ b/clusters/cl01tl/helm/ytdl-sub/templates/persistent-volume-claim.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: ytdl-sub-nfs-storage + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: ytdl-sub-nfs-storage + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + volumeName: ytdl-sub-nfs-storage + storageClassName: nfs-client + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Gi diff --git a/clusters/cl01tl/helm/ytdl-sub/templates/persistent-volume.yaml b/clusters/cl01tl/helm/ytdl-sub/templates/persistent-volume.yaml new file mode 100644 index 000000000..8375628a2 --- /dev/null +++ b/clusters/cl01tl/helm/ytdl-sub/templates/persistent-volume.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: ytdl-sub-nfs-storage + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: ytdl-sub-nfs-storage + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + persistentVolumeReclaimPolicy: Retain + storageClassName: nfs-client + capacity: + storage: 1Gi + accessModes: + - ReadWriteMany + nfs: + path: /volume2/Storage/Music Youtube/ + server: synologybond.alexlebens.net + mountOptions: + - vers=4 + - minorversion=1 + - noac diff --git a/clusters/cl01tl/helm/ytdl-sub/values.yaml b/clusters/cl01tl/helm/ytdl-sub/values.yaml new file mode 100644 index 000000000..2a41c3011 --- /dev/null +++ b/clusters/cl01tl/helm/ytdl-sub/values.yaml @@ -0,0 +1,100 @@ +ytdl-sub: + controllers: + main: + type: cronjob + cronjob: + suspend: false + concurrencyPolicy: Forbid + timeZone: US/Central + schedule: 0 0 1 1 * + startingDeadlineSeconds: 90 + successfulJobsHistory: 1 + failedJobsHistory: 1 + backoffLimit: 3 + parallelism: 1 + containers: + main: + image: + repository: ghcr.io/jmbannon/ytdl-sub + tag: 2025.12.26 + pullPolicy: IfNotPresent + command: + - ytdl-sub + args: + - --dry-run + - --config /config/config.yaml + - sub /config/subscriptions.yaml + env: + - name: TZ + value: America/Chicago + - name: CRON_RUN_ON_START + value: false + resources: + requests: + cpu: 10m + memory: 128Mi + configMaps: + config: + enabled: true + data: + config.yaml: | + configuration: + working_directory: /cache + + presets: + Music: + preset: + - "Max MP3 Quality" + + embed_thumbnail: True + + square_thumbnail: True + + throttle_protection: + sleep_per_download_s: + min: 5 + max: 15 + sleep_per_subscription_s: + min: 5 + max: 15 + max_downloads_per_subscription: + min: 1 + max: 200 + + overrides: + music_directory: "/music" + + subscriptions.yaml: | + Music: + - "https://www.youtube.com/playlist?list=PLtiOoYqxYXtKK3fMya_xhqK0Wit0i10Gy&si=8wNBH-kGT9Nx0XBK" # Music Saved + + persistence: + config: + enabled: true + type: configMap + name: ytdl-sub + advancedMounts: + main: + main: + - path: /config/config.yaml + readOnly: true + mountPropagation: None + subPath: config.yaml + - path: /config/subscriptions.yaml + readOnly: true + mountPropagation: None + subPath: subscriptions.yaml + cache: + type: emptyDir + advancedMounts: + main: + main: + - path: /cache + readOnly: false + music: + existingClaim: ytdl-sub-nfs-storage + advancedMounts: + main: + main: + - path: /music + readOnly: false