Skip to content

Commit

Permalink
Merges all my deployments to the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
1Solon committed Feb 25, 2024
1 parent 139da9d commit c9037f3
Show file tree
Hide file tree
Showing 38 changed files with 781 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
language-server-log.txt
language-server-log.txt
secret.yaml
tailscale-repo
File renamed without changes.
96 changes: 96 additions & 0 deletions clusters/home-cluster/media/jellyfin/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: jellyfin
name: jellyfin
namespace: home-samba
spec:
progressDeadlineSeconds: 600
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: jellyfin
template:
metadata:
labels:
app: jellyfin
spec:
volumes:
- name: jellyfin-config
persistentVolumeClaim:
claimName: jellyfin-pvc-data
- name: jellyfin-data
persistentVolumeClaim:
claimName: samba-pvc
- name: device-dri
hostPath:
path: /dev/dri
- name: device-dma-heap
hostPath:
path: /dev/dma_heap
- name: device-mali
hostPath:
path: /dev/mali0
- name: device-rga
hostPath:
path: /dev/rga
- name: device-mpp-service
hostPath:
path: /dev/mpp_service
containers:
- env:
- name: JELLYFIN_PublishedServerUrl
value: 192.168.1.113 # The IP, make sure it's the same as the IP in the TCP and UDP service yaml
- name: PGID
value: "\x36\x35\x35\x34\x31" # < ASCII code for '65541'
- name: PUID
value: "\x31\x30\x34\x34" #< ACII code for '1044'
- name: TZ
value: Europe/Amsterdam
securityContext:
privileged: true # Container must run as privileged inside of the pod, required for hardware acceleration
image: ghcr.io/linuxserver/jellyfin
imagePullPolicy: Always
name: jellyfin
ports:
- containerPort: 8096
name: http-tcp
protocol: TCP
- containerPort: 8920
name: https-tcp
protocol: TCP
- containerPort: 1900
name: dlna-udp
protocol: UDP
- containerPort: 7359
name: discovery-udp
protocol: UDP
resources: {}
stdin: true
tty: true
volumeMounts:
- mountPath: /config
name: jellyfin-config
- mountPath: /data
name: jellyfin-data
# Below are the path to mount devices for hardware acceleration
- mountPath: /dev/dri
name: device-dri
- mountPath: /dev/dma_heap
name: device-dma-heap
- mountPath: /dev/mali0
name: device-mali
- mountPath: /dev/rga
name: device-rga
- mountPath: /dev/mpp_service
name: device-mpp-service

dnsPolicy: ClusterFirst
restartPolicy: Always
priorityClassName: high-priority
27 changes: 27 additions & 0 deletions clusters/home-cluster/media/jellyfin/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jellyfin
namespace: home-samba
annotations:
kubernetes.io/ingress.class: "nginx" # < use the nginx ingress controller
# nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" # < communicate in https with the backend (service/pod). With a "#" in front of http will be used.
cert-manager.io/cluster-issuer: "letsencrypt-prod" # < use letsencrypt-prod application in kubernetes to generate ssl certificate
# nginx.ingress.kubernetes.io/app-root: # < the root directory here if it's different from the root directory (like /web).
spec:
rules:
- host: jellyfin.debont.net
http:
paths:
- path: /
pathType: Prefix # pathType no longer has a default value in v1; "Exact", "Prefix", or "ImplementationSpecific" must be specified
backend:
service:
name: jellyfin-tcp
port:
name: http-tcp # < same label as the port in the service tcp file
tls: # < placing a host in the TLS config will indicate a cert should be created
- hosts:
- jellyfin.home.com
secretName: jellyfin.home.com-tls # < cert-manager will store the created certificate in this secret.

12 changes: 12 additions & 0 deletions clusters/home-cluster/media/jellyfin/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jellyfin-pvc-data
namespace: home-samba
spec:
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 100Gi
21 changes: 21 additions & 0 deletions clusters/home-cluster/media/jellyfin/service-tcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
kind: Service
apiVersion: v1
metadata:
name: jellyfin-tcp
namespace: home-samba
annotations:
metallb.universe.tf/allow-shared-ip: jellyfin
spec:
selector:
app: jellyfin
ports:
- port: 8096
targetPort: 8096
name: http-tcp
protocol: TCP
- port: 8920
targetPort: 8920
name: https-tcp
type: LoadBalancer
loadBalancerIP: 192.168.1.157
sessionAffinity: ClientIP
22 changes: 22 additions & 0 deletions clusters/home-cluster/media/jellyfin/service-udp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kind: Service
apiVersion: v1
metadata:
name: jellyfin-udp
namespace: home-samba
annotations:
metallb.universe.tf/allow-shared-ip: jellyfin
spec:
selector:
app: jellyfin
ports:
- port: 1900
targetPort: 1900
name: dlna-udp
protocol: UDP
- port: 7359
targetPort: 7359
name: discovery-udp
protocol: UDP
type: LoadBalancer
loadBalancerIP: 192.168.1.157
sessionAffinity: ClientIP
32 changes: 32 additions & 0 deletions clusters/home-cluster/media/jellyseer/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jellyseerr-deployment
namespace: home-samba
spec:
replicas: 1
selector:
matchLabels:
app: jellyseerr
template:
metadata:
labels:
app: jellyseerr
spec:
containers:
- name: jellyseerr
image: fallenbagel/jellyseerr:latest
imagePullPolicy: Always
resources: {}
env:
- name: TZ
value: Dublin/Europe
ports:
- containerPort: 5055
volumeMounts:
- name: appdata
mountPath: /app/config
volumes:
- name: appdata
persistentVolumeClaim:
claimName: jellyseerr-pvc
11 changes: 11 additions & 0 deletions clusters/home-cluster/media/jellyseer/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jellyseerr-pvc
namespace: home-samba
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
13 changes: 13 additions & 0 deletions clusters/home-cluster/media/jellyseer/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: jellyseerr-service
namespace: home-samba
spec:
selector:
app: jellyseerr
ports:
- protocol: TCP
port: 5055
targetPort: 5055
type: LoadBalancer
4 changes: 4 additions & 0 deletions clusters/home-cluster/media/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: home-samba
33 changes: 33 additions & 0 deletions clusters/home-cluster/media/notifarr/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: notifiarr
namespace: home-samba
spec:
replicas: 1
selector:
matchLabels:
app: notifiarr
template:
metadata:
labels:
app: notifiarr
spec:
containers:
- name: notifiarr
image: golift/notifiarr:latest
imagePullPolicy: Always
resources: {}
ports:
- containerPort: 5454
volumeMounts:
- name: appdata
mountPath: /config
- name: appdata
mountPath: /var/run/utmp
- name: appdata
mountPath: /etc/machine-id
volumes:
- name: appdata
persistentVolumeClaim:
claimName: notifiarr-pvc
11 changes: 11 additions & 0 deletions clusters/home-cluster/media/notifarr/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: notifiarr-pvc
namespace: home-samba
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
13 changes: 13 additions & 0 deletions clusters/home-cluster/media/notifarr/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: notifiarr-service
namespace: home-samba
spec:
selector:
app: notifiarr
ports:
- protocol: TCP
port: 5454
targetPort: 5454
type: LoadBalancer
35 changes: 35 additions & 0 deletions clusters/home-cluster/media/postgres/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
namespace: home-samba
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:14
resources: {}
env:
- name: POSTGRES_PASSWORD
value: "qstick"
- name: POSTGRES_USER
value: "qstick"
- name: POSTGRES_DB
value: "sonarr-main"
- name: PGDATA
value: "/var/lib/postgresql/data/pgdata"
volumeMounts:
- name: postgres-storage
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-storage
persistentVolumeClaim:
claimName: postgres-pvc
11 changes: 11 additions & 0 deletions clusters/home-cluster/media/postgres/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
namespace: home-samba
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
12 changes: 12 additions & 0 deletions clusters/home-cluster/media/postgres/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: postgres-service
namespace: home-samba
spec:
selector:
app: postgres
ports:
- protocol: TCP
port: 5432
targetPort: 5432
Loading

0 comments on commit c9037f3

Please sign in to comment.