Skip to content

Commit

Permalink
feat(kubernetes): install jellyfin (#913)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinohmann authored Jun 3, 2024
1 parent a407b0b commit bf827e2
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kubernetes/main/apps/default/homepage/app/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ data:
background:
image: https://static.18b.haus/img/wooden-floor.jpg
opacity: 10
fiveColumns: true
fiveColumns: false
headerStyle: clean
hideErrors: true
hideVersion: true
Expand All @@ -63,6 +63,8 @@ data:
style: column
Tools:
style: column
Media:
style: column
showStats: false
statusStyle: dot
target: _self
Expand Down
129 changes: 129 additions & 0 deletions kubernetes/main/apps/default/jellyfin/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app jellyfin
spec:
interval: 2h
chart:
spec:
chart: app-template
version: 3.2.1
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
maxHistory: 2
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
dependsOn:
- name: longhorn
namespace: longhorn-system
- name: volsync
namespace: volsync-system
values:
controllers:
jellyfin:
containers:
app:
image:
repository: ghcr.io/jellyfin/jellyfin
tag: 10.9.4
env:
DOTNET_SYSTEM_IO_DISABLEFILELOCKING: "true"
JELLYFIN_PublishedServerUrl: &ip 192.168.40.247
probes:
liveness: &probe
enabled: true
custom: true
spec:
httpGet:
path: /health
port: 8096
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probe
startup:
enabled: true
custom: true
spec:
httpGet:
path: /health
port: 8096
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 30
resources:
requests:
cpu: 10m
memory: 512Mi
limits:
memory: 2Gi
defaultPodOptions:
securityContext:
runAsUser: 10000
runAsGroup: 10000
fsGroup: 10000
fsGroupChangePolicy: OnRootMismatch
service:
app:
controller: jellyfin
type: LoadBalancer
annotations:
io.cilium/lb-ipam-ips: *ip
ports:
http:
port: 8096
ingress:
app:
enabled: true
className: internal
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/group: Media
gethomepage.dev/icon: jellyfin.png
gethomepage.dev/name: Jellyfin
hosts:
- host: &host jellyfin.18b.haus
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
persistence:
config:
enabled: true
existingClaim: *app
globalMounts:
- path: /config
cache:
enabled: true
type: emptyDir
advancedMounts:
jellyfin:
main:
- path: /config/cache
transcode:
enabled: true
type: emptyDir
media:
enabled: true
type: nfs
server: storage.svc.18b.lan
path: /io/media
globalMounts:
- path: /media
7 changes: 7 additions & 0 deletions kubernetes/main/apps/default/jellyfin/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions kubernetes/main/apps/default/jellyfin/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.18b.haus/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app jellyfin
namespace: flux-system
spec:
targetNamespace: default
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/main/apps/default/jellyfin/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 2h
retryInterval: 1m
timeout: 5m
postBuild:
substitute:
APP: *app
VOLSYNC_ACCESSMODES: ReadWriteOnce
VOLSYNC_CAPACITY: 1Gi
VOLSYNC_SCHEDULE_B2: '45 1 * * 0'
VOLSYNC_SCHEDULE_MINIO: '45 1 * * *'
VOLSYNC_MOVER_FS_GROUP: '10000'
VOLSYNC_MOVER_GROUP: '10000'
VOLSYNC_MOVER_USER: '10000'
1 change: 1 addition & 0 deletions kubernetes/main/apps/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ resources:
- ./github-to-gitea-mirror/ks.yaml
- ./home-assistant/ks.yaml
- ./homepage/ks.yaml
- ./jellyfin/ks.yaml
- ./kubernetes-schemas/ks.yaml
- ./mosquitto/ks.yaml
- ./nextcloud/ks.yaml
Expand Down

0 comments on commit bf827e2

Please sign in to comment.