From ab782d6386a7ec3fec4a6686c69283dc5ecf47da Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Wed, 23 Oct 2024 21:27:59 -0500 Subject: [PATCH] add jellyfin --- .../apps/anime/jellyfin/app/helmrelease.yaml | 125 ++++++++++++++++++ .../anime/jellyfin/app/kustomization.yaml | 8 ++ kubernetes/apps/anime/jellyfin/ks.yaml | 27 ++++ kubernetes/apps/anime/kustomization.yaml | 2 +- 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 kubernetes/apps/anime/jellyfin/app/helmrelease.yaml create mode 100644 kubernetes/apps/anime/jellyfin/app/kustomization.yaml create mode 100644 kubernetes/apps/anime/jellyfin/ks.yaml diff --git a/kubernetes/apps/anime/jellyfin/app/helmrelease.yaml b/kubernetes/apps/anime/jellyfin/app/helmrelease.yaml new file mode 100644 index 00000000..c9c10b7d --- /dev/null +++ b/kubernetes/apps/anime/jellyfin/app/helmrelease.yaml @@ -0,0 +1,125 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: &app jellyfin +spec: + interval: 30m + chart: + spec: + chart: app-template + version: 3.5.1 + sourceRef: + kind: HelmRepository + name: bjw-s + namespace: flux-system + install: + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + remediation: + strategy: rollback + retries: 3 + dependsOn: + - name: nvidia-device-plugin + namespace: kube-system + - name: node-feature-discovery + namespace: system + - name: rook-ceph-cluster + namespace: rook-ceph + - name: volsync + namespace: system + values: + controllers: + jellyfin: + annotations: + reloader.stakater.com/auto: "true" + containers: + app: + image: + repository: ghcr.io/jellyfin/jellyfin + tag: 10.9.11@sha256:fc1b51f4be3fba725e42dae2022d9c6a5b069acce01bef04d32fdee025dc511e + env: + DOTNET_SYSTEM_IO_DISABLEFILELOCKING: "true" + JELLYFIN_FFmpeg__probesize: 50000000 + JELLYFIN_FFmpeg__analyzeduration: 50000000 + TZ: America/Chicago + probes: + liveness: &probes + enabled: true + custom: true + spec: + httpGet: + path: /health + port: &port 8096 + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 3 + readiness: *probes + startup: + enabled: false + resources: + requests: + cpu: 100m + limits: + nvidia.com/gpu: 1 # requesting 1 GPU + memory: 4Gi + pod: + nodeSelector: + nvidia.com/gpu.present: "true" + securityContext: + runAsUser: 568 + runAsGroup: 568 + runAsNonRoot: true + fsGroup: 568 + fsGroupChangePolicy: OnRootMismatch + supplementalGroups: [44, 10000] + service: + app: + controller: *app + type: LoadBalancer + annotations: + io.cilium/lb-ipam-ips: 10.1.1.40 + ports: + http: + port: *port + ingress: + app: + annotations: + external-dns.alpha.kubernetes.io/target: external.hsn.dev + nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + external-dns.alpha.kubernetes.io/cloudflare-proxied: "true" + className: external-nginx + hosts: + - host: "{{ .Release.Name }}.hsn.dev" + paths: + - path: / + service: + identifier: app + port: http + persistence: + config: + enabled: true + existingClaim: *app + globalMounts: + - path: /config + media: + type: nfs + server: shadowfax.jahanson.tech + path: /moria/media + globalMounts: + - path: /media + readOnly: true + transcode: + enabled: true + type: emptyDir + globalMounts: + - path: /transcode + cache: + enabled: true + type: emptyDir + globalMounts: + - path: /cache diff --git a/kubernetes/apps/anime/jellyfin/app/kustomization.yaml b/kubernetes/apps/anime/jellyfin/app/kustomization.yaml new file mode 100644 index 00000000..ae6835d4 --- /dev/null +++ b/kubernetes/apps/anime/jellyfin/app/kustomization.yaml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml + - ../../../../templates/gatus/external + - ../../../../templates/volsync diff --git a/kubernetes/apps/anime/jellyfin/ks.yaml b/kubernetes/apps/anime/jellyfin/ks.yaml new file mode 100644 index 00000000..20dbe54b --- /dev/null +++ b/kubernetes/apps/anime/jellyfin/ks.yaml @@ -0,0 +1,27 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app jellyfin + namespace: flux-system +spec: + targetNamespace: anime + commonMetadata: + labels: + app.kubernetes.io/name: *app + dependsOn: + - name: external-secrets-stores + path: ./kubernetes/apps/anime/jellyfin/app + prune: true + sourceRef: + kind: GitRepository + name: theshire + wait: false + interval: 30m + timeout: 5m + postBuild: + substitute: + APP: *app + GATUS_PATH: /web/index.html + VOLSYNC_CAPACITY: 20Gi diff --git a/kubernetes/apps/anime/kustomization.yaml b/kubernetes/apps/anime/kustomization.yaml index d4eb3a1e..3ead0922 100644 --- a/kubernetes/apps/anime/kustomization.yaml +++ b/kubernetes/apps/anime/kustomization.yaml @@ -6,7 +6,7 @@ resources: # Pre Flux-Kustomizations - ./namespace.yaml # Flux-Kustomizations - # - ./jellyfin/ks.yaml # sqlite + - ./jellyfin/ks.yaml # sqlite # - ./jellyseerr/ks.yaml # sqlite - ./radarr/ks.yaml # postgres # - ./shoko/ks.yaml # sqlite