feat: Add Plex
This commit is contained in:
parent
93889fa1d4
commit
ebc1a1a21a
9 changed files with 185 additions and 0 deletions
|
|
@ -174,3 +174,22 @@ spec:
|
|||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: plex
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://code.peterg.nl/wheatley/kubernetes.git
|
||||
path: k8s-wheatley/plex
|
||||
targetRevision: HEAD
|
||||
destination:
|
||||
server: https://10.13.37.10:6443
|
||||
namespace: plex
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
|
|
|
|||
9
k8s-wheatley/plex/configmap.yaml
Normal file
9
k8s-wheatley/plex/configmap.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: plex-envs
|
||||
data:
|
||||
PLEX_UID: "1000"
|
||||
PLEX_GID: "1000"
|
||||
TZ: Europe/Amsterdam
|
||||
49
k8s-wheatley/plex/deployments.yaml
Normal file
49
k8s-wheatley/plex/deployments.yaml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: plex
|
||||
labels:
|
||||
app: plex
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: plex
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: plex
|
||||
spec:
|
||||
volumes:
|
||||
- name: plex-config
|
||||
persistentVolumeClaim:
|
||||
claimName: plex-storage
|
||||
- name: nfs-media
|
||||
persistentVolumeClaim:
|
||||
claimName: nfs-media
|
||||
containers:
|
||||
- name: plex
|
||||
image: plexinc/pms-docker:1.43.0.10467-2b1ba6e69
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 32400
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: plex-envs
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: plex-config
|
||||
- mountPath: /data
|
||||
name: nfs-media
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- "ALL"
|
||||
add:
|
||||
- "CHOWN"
|
||||
- "SETUID"
|
||||
- "SETGID"
|
||||
17
k8s-wheatley/plex/ingress.yaml
Normal file
17
k8s-wheatley/plex/ingress.yaml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: plex-route
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: internal
|
||||
namespace: kube-system
|
||||
sectionName: https
|
||||
hostnames:
|
||||
- "plex.wheatley.in"
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: plex
|
||||
port: 80
|
||||
|
||||
13
k8s-wheatley/plex/kustomization.yaml
Normal file
13
k8s-wheatley/plex/kustomization.yaml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: plex
|
||||
|
||||
resources:
|
||||
- configmap.yaml
|
||||
- deployments.yaml
|
||||
- ingress.yaml
|
||||
- pvc.yaml
|
||||
- secrets.yaml
|
||||
- services.yaml
|
||||
- namespace.yaml
|
||||
5
k8s-wheatley/plex/namespace.yaml
Normal file
5
k8s-wheatley/plex/namespace.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: plex
|
||||
45
k8s-wheatley/plex/pvc.yaml
Normal file
45
k8s-wheatley/plex/pvc.yaml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: plex-storage
|
||||
spec:
|
||||
storageClassName: piraeus-lvmthin
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nfs-media
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadOnlyMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 40Ti
|
||||
volumeName: nfs-media-plex
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: nfs-media-plex
|
||||
spec:
|
||||
capacity:
|
||||
storage: 40Ti
|
||||
accessModes:
|
||||
- ReadOnlyMany
|
||||
nfs:
|
||||
server: 10.0.69.10
|
||||
path: /tank/media
|
||||
mountOptions:
|
||||
- vers=4.1
|
||||
- rsize=1048576
|
||||
- wsize=1048576
|
||||
- hard
|
||||
- timeo=600
|
||||
- noatime
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
16
k8s-wheatley/plex/secrets.yaml
Normal file
16
k8s-wheatley/plex/secrets.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: plex-env-secrets
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: vault-wheatley
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: plex-env-secrets
|
||||
data:
|
||||
- secretKey: PLEX_CLAIM
|
||||
remoteRef:
|
||||
key: secrets/managed/plex/env-secrets
|
||||
property: PLEX_CLAIM
|
||||
12
k8s-wheatley/plex/services.yaml
Normal file
12
k8s-wheatley/plex/services.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: plex
|
||||
spec:
|
||||
selector:
|
||||
app: plex
|
||||
ports:
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 32400
|
||||
Loading…
Add table
Add a link
Reference in a new issue