feat(stream): Add jellyfin/seerr configuration bases

This commit is contained in:
Tanguy Herbron 2023-03-14 21:39:03 +01:00
parent 1dbbdb498b
commit 9738c58f92
13 changed files with 269 additions and 0 deletions

View File

@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jellyfin
namespace: streaming
spec:
replicas: 1
selector:
matchLabels:
app: jellyfin
template:
metadata:
labels:
app: jellyfin
spec:
hostname: jellyfin
subdomain: jellyfin
containers:
- name: jellyfin
image: jellyfin/jellyfin:10.8.9
ports:
- containerPort: 8096
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: TZ
value: "Europe/Copenhagen"
volumeMounts:
- mountPath: "/config"
name: jellyfin-pvc
- mountPath: "/shows"
name: jellyfin-shows
volumes:
- name: jellyfin-pvc
persistentVolumeClaim:
claimName: jellyfin-pvc
- name: jellyfin-shows
persistentVolumeClaim:
claimName: jellyfin-shows
nodeSelector:
type: "wide"

View File

@ -0,0 +1,31 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jellyfin-ingress
namespace: streaming
annotations:
kubernetes.io/ingress.class: "traefik"
ingress.kubernetes.io/rewrite-target: /
spec:
tls:
- secretName: jellyfin-beta-tls
hosts:
- stream.beta.halia.dev
rules:
- host: stream.beta.halia.dev
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jellyfin-svc
port:
number: 80
- path: /metrics
pathType: Prefix
backend:
service:
name: jellyfin-svc
port:
number: 80

View File

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- pvc.yaml
- service.yaml
- ingress.yaml
- configmap.yaml
- deployment.yaml

View File

@ -0,0 +1,9 @@
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: metrics-blocker
namespace: streaming
spec:
replacePathRegex:
regex: ^/metrics
replacement: /

View File

@ -0,0 +1,49 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jellyfin-pvc
namespace: streaming
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: flat-storage-class
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-shows
namespace: streaming
spec:
storageClassName: ""
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy:
mountOptions:
- hard
- nfsvers=4.1
nfs:
path: /mnt/Alpha/Beta
server: 10.10.0.18
readOnly: false
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jellyfin-shows
namespace: streaming
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: ""
volumeName: nfs-shows
volumeMode: Filesystem

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: jellyfin-svc
namespace: streaming
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8096
selector:
app: jellyfin

View File

@ -0,0 +1,16 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: traefik-ingress
namespace: streaming
spec:
entryPoints:
- websecure
routes:
- match: Host(`stream.beta.halia.dev`) && PathPrefix(`/`)
middlewares:
- name: metrics-blocker
kind: Rule
services:
- name: jellyfin-svc
port: 80

View File

@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jellyseerr
namespace: streaming
spec:
replicas: 1
selector:
matchLabels:
app: jellyseerr
template:
metadata:
labels:
app: jellyseerr
spec:
hostname: jellyseerr
subdomain: jellyseerr
containers:
- name: jellyseerr
image: fallenbagel/jellyseerr:latest
lifecycle:
postStart:
exec:
command:
['/bin/sh', '-c',
'mkdir -p /app/config &&
cp /app/config/settings.template.json /app/config/settings.json
']
ports:
- containerPort: 5055
env:
- name: TZ
value: "Europe/Copenhagen"
- name: LOG_LEVEL
value: "debug"
volumeMounts:
- name: jellyseer-config-volume
mountPath: /app/config/settings.template.json
subPath: settings.template.json
volumes:
- name: jellyseer-config-volume
configMap:
defaultMode: 420
name: jellyseer-config

View File

@ -0,0 +1,23 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jellyseerr-ingress
namespace: streaming
annotations:
kubernetes.io/ingress.class: "traefik"
spec:
tls:
- secretName: jellyseerr-beta-tls
hosts:
- request.beta.halia.dev
rules:
- host: request.beta.halia.dev
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jellyseerr-svc
port:
number: 80

View File

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service.yaml
- ingress.yaml
- configmap.yaml
- deployment.yaml

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: jellyseerr-svc
namespace: streaming
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 5055
selector:
app: jellyseerr

View File

@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- ./jellyfin
- ./jellyseerr

4
streaming/namespace.yaml Normal file
View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: streaming