Skip to content

Commit

Permalink
feat: install jellyfin
Browse files Browse the repository at this point in the history
  • Loading branch information
willianpaixao committed May 7, 2024
1 parent 7c2b5f3 commit d1a13bf
Show file tree
Hide file tree
Showing 6 changed files with 160 additions and 0 deletions.
109 changes: 109 additions & 0 deletions kubernetes/apps/media/jellyfin/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/app-template-3.1.0/charts/other/app-template/values.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: &app jellyfin
namespace: &namespace media
spec:
interval: 15m
chart:
spec:
chart: app-template
version: 3.1.0
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
interval: 15m
install:
remediation:
retries: 5
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
controllers:
jellyfin:
pod:
securityContext:
runAsUser: 568
runAsGroup: 568
fsGroup: 568
fsGroupChangePolicy: OnRootMismatch
supplementalGroups:
- 44
- 109
containers:
main:
image:
repository: jellyfin/jellyfin
tag: "10.8.13-1"
env:
DOTNET_SYSTEM_IO_DISABLEFILELOCKING: "true"
JELLYFIN_FFmpeg__probesize: 50000000
JELLYFIN_FFmpeg__analyzeduration: 50000000
JELLYFIN_CACHE_DIR: /cache
TZ: ${TIMEZONE}
resources:
requests:
memory: 1Gi
limits:
memory: 2Gi
probes:
startup:
enabled: true
spec:
failureThreshold: 30
periodSeconds: 5
liveness:
enabled: true
readiness:
enabled: true
service:
main:
controller: jellyfin
ports:
http:
port: &port 8096
discovery:
enabled: true
port: 7359
protocol: UDP
dlna:
enabled: true
port: 1900
protocol: UDP
ingress:
main:
enabled: true
className: internal
hosts:
- host: &host jellyfin.${SECRET_DOMAIN}
paths:
- path: /
pathType: Prefix
service:
identifier: main
port: http
tls:
- hosts:
- *host
persistence:
config:
enabled: true
type: persistentVolumeClaim
accessMode: ReadWriteOnce
size: 1Gi
cache:
enabled: true
type: emptyDir
globalMounts:
- path: /cache
transcode:
enabled: true
type: emptyDir
globalMounts:
- path: /transcodes
6 changes: 6 additions & 0 deletions kubernetes/apps/media/jellyfin/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helmrelease.yaml
- pdb.yaml
11 changes: 11 additions & 0 deletions kubernetes/apps/media/jellyfin/app/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: jellyfin-pdb
namespace: media
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: jellyfin
21 changes: 21 additions & 0 deletions kubernetes/apps/media/jellyfin/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.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: media
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/media/jellyfin/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 15m
6 changes: 6 additions & 0 deletions kubernetes/apps/media/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./jellyfin/ks.yaml
7 changes: 7 additions & 0 deletions kubernetes/apps/media/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: media
labels:
kustomize.toolkit.fluxcd.io/prune: disabled

0 comments on commit d1a13bf

Please sign in to comment.