add plex install

This commit is contained in:
Mans Ziesel 2024-10-26 18:54:03 +02:00
parent f108d55965
commit 8e7f834fe0
8 changed files with 157 additions and 12 deletions

View File

@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: argo-app-mediaserver
namespace: argocd
spec:
destination:
name: ''
namespace: default
server: https://kubernetes.default.svc
source:
path: mediaserver
repoURL: https://git.mziesel.nl/mans/argocd-test
targetRevision: HEAD
sources: []
project: default
syncPolicy:
automated:
prune: true
selfHeal: true

View File

@ -4,15 +4,16 @@ kind: Kustomization
namespace: argocd
resources:
- ./base/whoami-application.yaml
- ./base/metallb-application.yaml
- ./base/traefik-application.yaml
- ./base/ip-mziesel-nl-application.yaml
- ./base/cert-manager.yaml
- ./base/cyberchef.yaml
- ./base/go-redirect.yaml
- ./base/redlib-application.yaml
- ./base/librespeed-application.yaml
- ./base/nfs-subdir-external-provisioner-application.yaml
- ./base/cloudnative-pg-application.yaml
- ./base/keycloak-application.yaml
- ./base/whoami-application.yaml
- ./base/metallb-application.yaml
- ./base/traefik-application.yaml
- ./base/ip-mziesel-nl-application.yaml
- ./base/cert-manager.yaml
- ./base/cyberchef.yaml
- ./base/go-redirect.yaml
- ./base/redlib-application.yaml
- ./base/librespeed-application.yaml
- ./base/nfs-subdir-external-provisioner-application.yaml
- ./base/cloudnative-pg-application.yaml
- ./base/keycloak-application.yaml
- ./base/mediaserver-application.yaml

View File

@ -0,0 +1,63 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: plex
namespace: plex
labels:
app: plexserver
spec:
replicas: 1
selector:
matchLabels:
app: plexserver
template:
metadata:
labels:
app: plexserver
annotations:
spec:
volumes:
- name: plex-config
persistentVolumeClaim:
claimName: mediaserver-plex-config-pvc
- name: plex-data
persistentVolumeClaim:
claimName: mediaserver-plex-data-pvc
containers:
- name: plex
- image: plexinc/pms-docker:latest@sha256:1846de6eb835a046d1c5bbffddc0c3ed44e5fa1c56f2ad8deb1dafd00fc61bc2
resources:
requests:
cpu: 1
memory: 512Mi
ports:
- name: plex
containerPort: 32400 #PMS
- name: plex-ud
pcontainerPort: 32400
protocol: UDP
- name: plex-dlna
containerPort: 32469 #Plex DLNA
- name: plex-discovery
containerPort: 5353
protocol: UDP
- name: plex-dlna-udp
containerPort: 1900 #Plex DLNA
protocol: UDP
env:
- name: UID
value: "\x31\x30\x30\x33" #Corresponds to user id on NFS server (ascii)
- name: GID
value: "\x31\x30\x30\x33" #Corresponds to group id on NFS server
- name: PLEX_CLAIM
value: claim-jTsXpqQhAhsTjJYRdmsx
- name: HOSTNAME
value: plex.mziesel.nl
- name: TZ
value: Europe/Amsterdam
volumeMounts:
- mountPath: /config
name: plex-config
- mountPath: /data
name: plex-data

View File

@ -0,0 +1,12 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: mediaserver-ingressroute
spec:
routes:
- match: Host(`mediaserver.mziesel.nl`)
kind: Rule
services:
- name: mediaserver
port: web
tls: {}

View File

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

View File

@ -0,0 +1,23 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: mediaserver-plex-config-pvc
spec:
storageClassName: nfs-client
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: mediaserver-plex-data-pvc
spec:
storageClassName: nfs-client
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Gi

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: mediaserver
spec:
ports:
- name: web
port: 80
targetPort: web
selector:
app: mediaserver

View File

@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: mediaserver
resources:
- ./base/mediaserver-namespace.yaml
- ./base/mediaserver-plex-pvc.yaml
- ./base/mediaserver-deployment.yaml
- ./base/mediaserver-svc.yaml
- ./base/mediaserver-ingress.yaml