From 091708754981b0c175fb07c79f520abc41ae26e4 Mon Sep 17 00:00:00 2001 From: Kireque <5346530+kireque@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:03:55 +0100 Subject: [PATCH] feat(jellyfin): deploy :rocket: --- .../apps/media/jellyfin/app/helmrelease.yaml | 115 ++++++++++++++++++ .../media/jellyfin/app/kustomization.yaml | 7 ++ kubernetes/main/apps/media/jellyfin/ks.yaml | 29 +++++ kubernetes/main/apps/media/kustomization.yaml | 1 + 4 files changed, 152 insertions(+) create mode 100644 kubernetes/main/apps/media/jellyfin/app/helmrelease.yaml create mode 100644 kubernetes/main/apps/media/jellyfin/app/kustomization.yaml create mode 100644 kubernetes/main/apps/media/jellyfin/ks.yaml diff --git a/kubernetes/main/apps/media/jellyfin/app/helmrelease.yaml b/kubernetes/main/apps/media/jellyfin/app/helmrelease.yaml new file mode 100644 index 000000000..8793f8afc --- /dev/null +++ b/kubernetes/main/apps/media/jellyfin/app/helmrelease.yaml @@ -0,0 +1,115 @@ +--- +# 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: jellyfin +spec: + chart: + spec: + chart: app-template + version: 3.5.1 + interval: 30m + sourceRef: + kind: HelmRepository + name: bjw-s + namespace: flux-system + interval: 30m + values: + controllers: + jellyfin: + annotations: + reloader.stakater.com/auto: "true" + + pod: + nodeSelector: + intel.feature.node.kubernetes.io/gpu: "true" + securityContext: + runAsUser: 2000 + runAsGroup: 2000 + fsGroup: 2000 + fsGroupChangePolicy: "OnRootMismatch" + supplementalGroups: + - 44 + - 109 + - 65542 # gladius:external-services + + containers: + app: + image: + repository: ghcr.io/jellyfin/jellyfin + tag: "10.10.1" + env: + DOTNET_SYSTEM_IO_DISABLEFILELOCKING: "true" + JELLYFIN_PublishedServerUrl: + 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 + gpu.intel.com/i915: 1 + memory: 512Mi + limits: + gpu.intel.com/i915: 1 + memory: 4Gi + + service: + app: + controller: jellyfin + type: LoadBalancer + annotations: + lbipam.cilium.io/ips: 10.1.1.133 + ports: + http: + port: 8096 + + ingress: + app: + annotations: + external-dns.alpha.kubernetes.io/target: ingress-ext.econline.nl + className: "external-nginx" + hosts: + - host: jellyfin.econline.nl + paths: + - path: / + service: + identifier: app + port: http + + persistence: + config: + existingClaim: jellyfin-config + advancedMounts: + jellyfin: + app: + - path: /config + nfs-nas-media-library: + type: nfs + server: nas.home.econline.nl + path: /volume3/Download + advancedMounts: + jellyfin: + app: + - path: /data/nas-media/Library + tmpfs: + type: emptyDir + advancedMounts: + jellyfin: + app: + - path: /cache + subPath: cache + - path: /transcode + subPath: transcode diff --git a/kubernetes/main/apps/media/jellyfin/app/kustomization.yaml b/kubernetes/main/apps/media/jellyfin/app/kustomization.yaml new file mode 100644 index 000000000..a928a5635 --- /dev/null +++ b/kubernetes/main/apps/media/jellyfin/app/kustomization.yaml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml + - ../../../../templates/volsync diff --git a/kubernetes/main/apps/media/jellyfin/ks.yaml b/kubernetes/main/apps/media/jellyfin/ks.yaml new file mode 100644 index 000000000..6e63e46d4 --- /dev/null +++ b/kubernetes/main/apps/media/jellyfin/ks.yaml @@ -0,0 +1,29 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &appname jellyfin + namespace: flux-system +spec: + targetNamespace: media + commonMetadata: + labels: + app.kubernetes.io/name: *appname + interval: 30m + timeout: 5m + path: "./kubernetes/main/apps/media/jellyfin/app" + prune: true + sourceRef: + kind: GitRepository + name: home-ops-kubernetes + wait: true + dependsOn: + - name: rook-ceph-cluster + - name: volsync + - name: external-secrets-stores + postBuild: + substitute: + APP: *appname + VOLSYNC_CLAIM: jellyfin-config + VOLSYNC_CAPACITY: 20Gi diff --git a/kubernetes/main/apps/media/kustomization.yaml b/kubernetes/main/apps/media/kustomization.yaml index 7041b4e7f..2c7615c98 100644 --- a/kubernetes/main/apps/media/kustomization.yaml +++ b/kubernetes/main/apps/media/kustomization.yaml @@ -6,6 +6,7 @@ resources: # Pre Flux-Kustomizations - ./namespace.yaml # Flux-Kustomizations + - ./jellyfin/ks.yaml - ./maintainerr/ks.yaml - ./piped/ks.yaml - ./plex/ks.yaml