From 2a794cc6414a220f13460d4bd09d31c4d9d456be Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Sun, 27 Oct 2024 11:46:00 +0100 Subject: [PATCH] re structure mediaserver layout --- ....yaml => mediaserver-plex-deployment.yaml} | 43 ------------------- .../base/mediaserver-plex-ingress.yaml | 12 ++++++ ...er-pvcs.yaml => mediaserver-plex-pvc.yaml} | 12 ------ mediaserver/base/mediaserver-plex-svc.yaml | 11 +++++ ...l => mediaserver-prowlarr-deployment.yaml} | 27 +++++------- ...yaml => mediaserver-prowlarr-ingress.yaml} | 13 ------ .../base/mediaserver-prowlarr-pvc.yaml | 11 +++++ .../base/mediaserver-prowlarr-svc.yaml | 11 +++++ mediaserver/base/mediaserver-svc.yaml | 23 ---------- mediaserver/kustomization.yaml | 18 +++++--- 10 files changed, 69 insertions(+), 112 deletions(-) rename mediaserver/base/{mediaserver-deployment.yaml => mediaserver-plex-deployment.yaml} (63%) create mode 100644 mediaserver/base/mediaserver-plex-ingress.yaml rename mediaserver/base/{mediaserver-pvcs.yaml => mediaserver-plex-pvc.yaml} (66%) create mode 100644 mediaserver/base/mediaserver-plex-svc.yaml rename mediaserver/base/{mediaserver-deployment-rdtclient.yaml => mediaserver-prowlarr-deployment.yaml} (51%) rename mediaserver/base/{mediaserver-ingress.yaml => mediaserver-prowlarr-ingress.yaml} (51%) create mode 100644 mediaserver/base/mediaserver-prowlarr-pvc.yaml create mode 100644 mediaserver/base/mediaserver-prowlarr-svc.yaml delete mode 100644 mediaserver/base/mediaserver-svc.yaml diff --git a/mediaserver/base/mediaserver-deployment.yaml b/mediaserver/base/mediaserver-plex-deployment.yaml similarity index 63% rename from mediaserver/base/mediaserver-deployment.yaml rename to mediaserver/base/mediaserver-plex-deployment.yaml index 34eb6e9..c5857aa 100644 --- a/mediaserver/base/mediaserver-deployment.yaml +++ b/mediaserver/base/mediaserver-plex-deployment.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apps/v1 kind: Deployment metadata: @@ -61,45 +60,3 @@ spec: name: plex-config - mountPath: /data name: plex-data ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: prowlarr - labels: - app: prowlarr -spec: - replicas: 1 - selector: - matchLabels: - app: prowlarr - template: - metadata: - labels: - app: prowlarr - annotations: - spec: - volumes: - - name: prowlarr-config - persistentVolumeClaim: - claimName: mediaserver-prowlarr-config-pvc - containers: - - name: prowlarr - image: ghcr.io/hotio/prowlarr:nightly@sha256:a27cfcead7f6debe0e2e3409690ff2000076f902b38213555ad2716902823d45 - resources: - requests: - cpu: 1 - memory: 512Mi - ports: - - name: web - containerPort: 9696 - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: TZ - value: Europe/Amsterdam - volumeMounts: - - mountPath: /config - name: prowlarr-config diff --git a/mediaserver/base/mediaserver-plex-ingress.yaml b/mediaserver/base/mediaserver-plex-ingress.yaml new file mode 100644 index 0000000..9baa0fd --- /dev/null +++ b/mediaserver/base/mediaserver-plex-ingress.yaml @@ -0,0 +1,12 @@ +apiVersion: traefik.io/v1alpha1 +kind: IngressRoute +metadata: + name: mediaserver-ingressroute +spec: + routes: + - match: Host(`plex.mziesel.nl`) + kind: Rule + services: + - name: mediaserver-plex + port: web + tls: {} diff --git a/mediaserver/base/mediaserver-pvcs.yaml b/mediaserver/base/mediaserver-plex-pvc.yaml similarity index 66% rename from mediaserver/base/mediaserver-pvcs.yaml rename to mediaserver/base/mediaserver-plex-pvc.yaml index 1fec6f6..a02804d 100644 --- a/mediaserver/base/mediaserver-pvcs.yaml +++ b/mediaserver/base/mediaserver-plex-pvc.yaml @@ -21,15 +21,3 @@ spec: resources: requests: storage: 100Gi ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: mediaserver-prowlarr-config-pvc -spec: - storageClassName: nfs-client - accessModes: - - ReadWriteMany - resources: - requests: - storage: 2Gi diff --git a/mediaserver/base/mediaserver-plex-svc.yaml b/mediaserver/base/mediaserver-plex-svc.yaml new file mode 100644 index 0000000..d30c89c --- /dev/null +++ b/mediaserver/base/mediaserver-plex-svc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: mediaserver-plex +spec: + ports: + - name: web + port: 80 + targetPort: plex + selector: + app: plexserver diff --git a/mediaserver/base/mediaserver-deployment-rdtclient.yaml b/mediaserver/base/mediaserver-prowlarr-deployment.yaml similarity index 51% rename from mediaserver/base/mediaserver-deployment-rdtclient.yaml rename to mediaserver/base/mediaserver-prowlarr-deployment.yaml index 722fbff..21c6abe 100644 --- a/mediaserver/base/mediaserver-deployment-rdtclient.yaml +++ b/mediaserver/base/mediaserver-prowlarr-deployment.yaml @@ -1,37 +1,34 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: rdtclient + name: prowlarr labels: - app: rdtclient + app: prowlarr spec: replicas: 1 selector: matchLabels: - app: rdtclient + app: prowlarr template: metadata: labels: - app: rdtclient + app: prowlarr annotations: spec: volumes: - - name: rdtclient-data + - name: prowlarr-config persistentVolumeClaim: - claimName: mediaserver-rdtclient-data-pvc - - name: rdtclient-downloads - persistentVolumeClaim: - claimName: mediaserver-rdtclient-downloads-pvc + claimName: mediaserver-prowlarr-config-pvc containers: - - name: rdtclient - image: rogerfar/rdtclient + - name: prowlarr + image: ghcr.io/hotio/prowlarr:nightly@sha256:a27cfcead7f6debe0e2e3409690ff2000076f902b38213555ad2716902823d45 resources: requests: cpu: 1 memory: 512Mi ports: - name: web - containerPort: 6500 + containerPort: 9696 env: - name: PUID value: "1000" @@ -40,7 +37,5 @@ spec: - name: TZ value: Europe/Amsterdam volumeMounts: - - mountPath: /data/downloads - name: rdtclient-downloads - - mountPath: /data/db - name: rdtclient-data + - mountPath: /config + name: prowlarr-config diff --git a/mediaserver/base/mediaserver-ingress.yaml b/mediaserver/base/mediaserver-prowlarr-ingress.yaml similarity index 51% rename from mediaserver/base/mediaserver-ingress.yaml rename to mediaserver/base/mediaserver-prowlarr-ingress.yaml index aebea0d..7525efe 100644 --- a/mediaserver/base/mediaserver-ingress.yaml +++ b/mediaserver/base/mediaserver-prowlarr-ingress.yaml @@ -1,18 +1,5 @@ apiVersion: traefik.io/v1alpha1 kind: IngressRoute -metadata: - name: mediaserver-ingressroute -spec: - routes: - - match: Host(`plex.mziesel.nl`) - kind: Rule - services: - - name: mediaserver-plex - port: web - tls: {} ---- -apiVersion: traefik.io/v1alpha1 -kind: IngressRoute metadata: name: mediaserver-prowlarr-ingressroute spec: diff --git a/mediaserver/base/mediaserver-prowlarr-pvc.yaml b/mediaserver/base/mediaserver-prowlarr-pvc.yaml new file mode 100644 index 0000000..4e9b688 --- /dev/null +++ b/mediaserver/base/mediaserver-prowlarr-pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: mediaserver-prowlarr-config-pvc +spec: + storageClassName: nfs-client + accessModes: + - ReadWriteMany + resources: + requests: + storage: 2Gi diff --git a/mediaserver/base/mediaserver-prowlarr-svc.yaml b/mediaserver/base/mediaserver-prowlarr-svc.yaml new file mode 100644 index 0000000..0e943b9 --- /dev/null +++ b/mediaserver/base/mediaserver-prowlarr-svc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: mediaserver-prowlarr +spec: + ports: + - name: web + port: 80 + targetPort: web + selector: + app: prowlarr diff --git a/mediaserver/base/mediaserver-svc.yaml b/mediaserver/base/mediaserver-svc.yaml deleted file mode 100644 index 384b1f7..0000000 --- a/mediaserver/base/mediaserver-svc.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: mediaserver-plex -spec: - ports: - - name: web - port: 80 - targetPort: plex - selector: - app: plexserver ---- -apiVersion: v1 -kind: Service -metadata: - name: mediaserver-prowlarr -spec: - ports: - - name: web - port: 80 - targetPort: web - selector: - app: prowlarr diff --git a/mediaserver/kustomization.yaml b/mediaserver/kustomization.yaml index a22085d..0724af0 100644 --- a/mediaserver/kustomization.yaml +++ b/mediaserver/kustomization.yaml @@ -4,8 +4,16 @@ kind: Kustomization namespace: mediaserver resources: - - ./base/mediaserver-namespace.yaml - - ./base/mediaserver-pvcs.yaml - - ./base/mediaserver-deployment.yaml - - ./base/mediaserver-svc.yaml - - ./base/mediaserver-ingress.yaml +- ./base/mediaserver-namespace.yaml +- ./base/mediaserver-plex-deployment.yaml +- ./base/mediaserver-plex-ingress.yaml +- ./base/mediaserver-plex-pvc.yaml +- ./base/mediaserver-plex-svc.yaml +- ./base/mediaserver-prowlarr-deployment.yaml +- ./base/mediaserver-prowlarr-ingress.yaml +- ./base/mediaserver-prowlarr-pvc.yaml +- ./base/mediaserver-prowlarr-svc.yaml +- ./base/mediaserver-rdtclient-deployment.yaml +- ./base/mediaserver-rdtclient-ingress.yaml +- ./base/mediaserver-rdtclient-pvc.yaml +- ./base/mediaserver-rdtclient-svc.yaml