From f3a230c0eb72ddfdd471c971488ff64b032140fc Mon Sep 17 00:00:00 2001 From: Thomas Blarre Date: Wed, 6 Nov 2024 18:30:16 +0000 Subject: [PATCH] Added jellyfin --- .../templates/jellyfin-chart.yaml | 66 +++++++++++++++++++ .../templates/thomflix-postinstall-app.yaml | 3 +- thomflix-argocd-apps/values.yaml | 2 + .../templates/jellyfin-ingress.yaml | 23 +++++++ thomflix-postinstall/values.yaml | 2 + 5 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 thomflix-argocd-apps/templates/jellyfin-chart.yaml create mode 100644 thomflix-postinstall/templates/jellyfin-ingress.yaml diff --git a/thomflix-argocd-apps/templates/jellyfin-chart.yaml b/thomflix-argocd-apps/templates/jellyfin-chart.yaml new file mode 100644 index 0000000..e8886a6 --- /dev/null +++ b/thomflix-argocd-apps/templates/jellyfin-chart.yaml @@ -0,0 +1,66 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: jellyfin + namespace: {{ .Values.argocd.namespace }} + annotations: + argocd.argoproj.io/sync-wave: "0" + notifications.argoproj.io/subscribe.on-sync-succeeded.telegram: "-1002270587578" +spec: + project: {{ .Values.argocd.project }} + source: + repoURL: "tccr.io/truecharts" + chart: jellyfin + targetRevision: 20.x + helm: + releaseName: jellyfin + valuesObject: + persistence: + config: + enabled: true + mountPath: "/config" + type: pvc + storageClass: {{ .Values.generalConfigStorageClass }} + size: 8Gi + accessModes: ReadWriteOnce + namespace: {{ .Values.mainNamespace }} + cache: + enabled: true + mountPath: "/cache" + type: pvc + storageClass: {{ .Values.generalConfigStorageClass }} + size: 8Gi + accessModes: ReadWriteOnce + namespace: {{ .Values.mainNamespace }} + transcode: + enabled: true + mountPath: "/config/transcodes" + type: pvc + storageClass: {{ .Values.generalConfigStorageClass }} + size: 1Gi + accessModes: ReadWriteOnce + namespace: {{ .Values.mainNamespace }} + media: + enabled: true + mountPath: "/data/media" + type: pvc + existingClaim: thomflix-media + namespace: {{ .Values.mainNamespace }} + subPath: "data/media" + chartContext.appUrl: {{ .Values.jellyfinURL }} + destination: + server: {{ .Values.mainDestination }} + namespace: {{ .Values.mainNamespace }} + syncPolicy: + automated: + prune: true # Automatically remove resources no longer in the repo + selfHeal: true # Automatically self-heal when drift is detected + syncOptions: + - ApplyOutOfSyncOnly=true + - ServerSideApply=true + - CreateNamespace=true + ignoreDifferences: + - group: apps + kind: Deployment + jsonPointers: + - /spec/template/spec/hostUsers diff --git a/thomflix-argocd-apps/templates/thomflix-postinstall-app.yaml b/thomflix-argocd-apps/templates/thomflix-postinstall-app.yaml index b468778..3710e15 100644 --- a/thomflix-argocd-apps/templates/thomflix-postinstall-app.yaml +++ b/thomflix-argocd-apps/templates/thomflix-postinstall-app.yaml @@ -14,7 +14,8 @@ spec: path: thomflix-postinstall helm: releaseName: thomflix-postinstall - # valuesObject: + valuesObject: + jellyfinURL: {{ .Values.jellyfinURL }} destination: server: {{ .Values.mainDestination }} namespace: {{ .Values.mainNamespace }} diff --git a/thomflix-argocd-apps/values.yaml b/thomflix-argocd-apps/values.yaml index 6878153..9bacce0 100644 --- a/thomflix-argocd-apps/values.yaml +++ b/thomflix-argocd-apps/values.yaml @@ -14,3 +14,5 @@ generalConfigStorageClass: default transmission: torrentPort: 51414 rpcPort: 10109 + +jellyfinURL: "jellyfin.domain.net" diff --git a/thomflix-postinstall/templates/jellyfin-ingress.yaml b/thomflix-postinstall/templates/jellyfin-ingress.yaml new file mode 100644 index 0000000..7067ca8 --- /dev/null +++ b/thomflix-postinstall/templates/jellyfin-ingress.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt + name: jellyfin-ingress + namespace: {{ .Values.mainNamespace }} +spec: + rules: + - host: {{ .Values.jellyfinURL }} + http: + paths: + - pathType: Prefix + path: / + backend: + service: + name: jellyfin + port: + number: 8096 + tls: + - hosts: + - {{ .Values.jellyfinURL }} + secretName: jellyfin-cert diff --git a/thomflix-postinstall/values.yaml b/thomflix-postinstall/values.yaml index 4bfa98f..f047991 100644 --- a/thomflix-postinstall/values.yaml +++ b/thomflix-postinstall/values.yaml @@ -3,3 +3,5 @@ tailscaleIngresses: sonarrHostname: thomflix-sonarr radarrHostname: thomflix-radarr filebrowserHostname: thomflix-files +mainNamespace: thomflix +jellyfinURL: "jellyfin.domain.net"