From 5b2b52611386ee03e48983f325e2e4d8c53923fe Mon Sep 17 00:00:00 2001 From: bvanroll Date: Wed, 13 Nov 2024 07:20:17 +0100 Subject: [PATCH] switched to deployments for easier restarts also moved pvc's after accidntally deleting them :( --- k8s_manifests/bazarr/deployment.yaml | 46 +++++++++++++++ k8s_manifests/bazarr/pod.yaml | 37 ------------ k8s_manifests/flaresolverr/deployment.yaml | 31 ++++++++++ k8s_manifests/flaresolverr/service.yaml | 14 +++++ k8s_manifests/ingress.yaml | 10 ++++ k8s_manifests/lidarr/deployment.yaml | 44 ++++++++++++++ k8s_manifests/lidarr/pod.yaml | 35 ----------- k8s_manifests/plex/deployment.yaml | 58 +++++++++++++++++++ k8s_manifests/plex/pod.yaml | 49 ---------------- k8s_manifests/prowlarr/deployment.yaml | 38 ++++++++++++ k8s_manifests/prowlarr/pod.yaml | 29 ---------- .../{bazarr/pvc.yaml => pvc/bazarr.yaml} | 0 .../{lidarr/pvc.yaml => pvc/lidarr.yaml} | 0 .../{plex/pvc.yaml => pvc/plex.yaml} | 0 .../{prowlarr/pvc.yaml => pvc/prowlarr.yaml} | 0 .../pvc.yaml => pvc/qbittorrent.yaml} | 0 .../{radarr/pvc.yaml => pvc/radarr.yaml} | 0 .../{sonarr/pvc.yaml => pvc/sonarr.yaml} | 0 k8s_manifests/qbittorrent/deployment.yaml | 46 +++++++++++++++ k8s_manifests/qbittorrent/pod.yaml | 37 ------------ k8s_manifests/radarr/deployment.yaml | 44 ++++++++++++++ k8s_manifests/radarr/pod.yaml | 35 ----------- k8s_manifests/sonarr/deployment.yaml | 44 ++++++++++++++ k8s_manifests/sonarr/pod.yaml | 35 ----------- 24 files changed, 375 insertions(+), 257 deletions(-) create mode 100644 k8s_manifests/bazarr/deployment.yaml delete mode 100644 k8s_manifests/bazarr/pod.yaml create mode 100644 k8s_manifests/flaresolverr/deployment.yaml create mode 100644 k8s_manifests/flaresolverr/service.yaml create mode 100644 k8s_manifests/lidarr/deployment.yaml delete mode 100644 k8s_manifests/lidarr/pod.yaml create mode 100644 k8s_manifests/plex/deployment.yaml delete mode 100644 k8s_manifests/plex/pod.yaml create mode 100644 k8s_manifests/prowlarr/deployment.yaml delete mode 100644 k8s_manifests/prowlarr/pod.yaml rename k8s_manifests/{bazarr/pvc.yaml => pvc/bazarr.yaml} (100%) rename k8s_manifests/{lidarr/pvc.yaml => pvc/lidarr.yaml} (100%) rename k8s_manifests/{plex/pvc.yaml => pvc/plex.yaml} (100%) rename k8s_manifests/{prowlarr/pvc.yaml => pvc/prowlarr.yaml} (100%) rename k8s_manifests/{qbittorrent/pvc.yaml => pvc/qbittorrent.yaml} (100%) rename k8s_manifests/{radarr/pvc.yaml => pvc/radarr.yaml} (100%) rename k8s_manifests/{sonarr/pvc.yaml => pvc/sonarr.yaml} (100%) create mode 100644 k8s_manifests/qbittorrent/deployment.yaml delete mode 100644 k8s_manifests/qbittorrent/pod.yaml create mode 100644 k8s_manifests/radarr/deployment.yaml delete mode 100644 k8s_manifests/radarr/pod.yaml create mode 100644 k8s_manifests/sonarr/deployment.yaml delete mode 100644 k8s_manifests/sonarr/pod.yaml diff --git a/k8s_manifests/bazarr/deployment.yaml b/k8s_manifests/bazarr/deployment.yaml new file mode 100644 index 0000000..7e3cf00 --- /dev/null +++ b/k8s_manifests/bazarr/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: bazarr + labels: + app.kubernetes.io/name: bazarr +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: bazarr + template: + metadata: + labels: + app.kubernetes.io/name: bazarr + spec: + volumes: + - name: nfs-vol + nfs: + server: 192.168.0.114 + path: /mnt/test1/media/ + - name: config + persistentVolumeClaim: + claimName: config-bazarr + containers: + - name: bazarr + image: ghcr.io/hotio/bazarr:latest + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: UMASK + value: "002" + - name: TZ + value: "Etc/UTC" + - name: WEBUI_PORTS + value: "6767/tcp,6767/udp" + ports: + - containerPort: 6767 + volumeMounts: + - name: config + mountPath: /config + - name: nfs-vol + mountPath: /media + diff --git a/k8s_manifests/bazarr/pod.yaml b/k8s_manifests/bazarr/pod.yaml deleted file mode 100644 index e929aa3..0000000 --- a/k8s_manifests/bazarr/pod.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: bazarr - labels: - app.kubernetes.io/name: bazarr -spec: - volumes: - - name: nfs-vol - nfs: - server: 192.168.0.114 - path: /mnt/test1/media/ - - name: config - persistentVolumeClaim: - claimName: config-bazarr - containers: - - name: bazarr - image: ghcr.io/hotio/bazarr:latest - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: UMASK - value: "002" - - name: TZ - value: "Etc/UTC" - - name: WEBUI_PORTS - value: "6767/tcp,6767/udp" - ports: - - containerPort: 6767 - volumeMounts: - - name: config - mountPath: /config - - name: nfs-vol - mountPath: /media - diff --git a/k8s_manifests/flaresolverr/deployment.yaml b/k8s_manifests/flaresolverr/deployment.yaml new file mode 100644 index 0000000..5a6c6fd --- /dev/null +++ b/k8s_manifests/flaresolverr/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flaresolverr + labels: + app.kubernetes.io/name: flaresolverr +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: flaresolverr + template: + metadata: + labels: + app.kubernetes.io/name: flaresolverr + spec: + containers: + - name: flaresolverr + image: ghcr.io/flaresolverr/flaresolverr:latest + env: + - name: LOG_LEVEL + value: info + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: UMASK + value: "002" + - name: TZ + value: "Etc/UTC" + diff --git a/k8s_manifests/flaresolverr/service.yaml b/k8s_manifests/flaresolverr/service.yaml new file mode 100644 index 0000000..33e5401 --- /dev/null +++ b/k8s_manifests/flaresolverr/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: svc-flaresolverr +spec: + selector: + app.kubernetes.io/name: flaresolverr + ports: + - name: webui + protocol: TCP + port: 80 + targetPort: 8191 + + diff --git a/k8s_manifests/ingress.yaml b/k8s_manifests/ingress.yaml index 1b50e5a..62e1646 100644 --- a/k8s_manifests/ingress.yaml +++ b/k8s_manifests/ingress.yaml @@ -74,3 +74,13 @@ spec: name: svc-sonarr port: number: 80 + - host: "flaresolverr.local" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: svc-flaresolverr + port: + number: 80 diff --git a/k8s_manifests/lidarr/deployment.yaml b/k8s_manifests/lidarr/deployment.yaml new file mode 100644 index 0000000..c0fa7f5 --- /dev/null +++ b/k8s_manifests/lidarr/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: lidarr + labels: + app.kubernetes.io/name: lidarr +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: lidarr + template: + metadata: + labels: + app.kubernetes.io/name: lidarr + spec: + volumes: + - name: nfs-vol + nfs: + server: 192.168.0.114 + path: /mnt/test1/media/ + - name: config + persistentVolumeClaim: + claimName: config-lidarr + containers: + - name: lidarr + image: ghcr.io/hotio/lidarr:latest + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: UMASK + value: "002" + - name: TZ + value: "Etc/UTC" + ports: + - containerPort: 8686 + volumeMounts: + - name: config + mountPath: /config + - name: nfs-vol + mountPath: /media + diff --git a/k8s_manifests/lidarr/pod.yaml b/k8s_manifests/lidarr/pod.yaml deleted file mode 100644 index f5e4d30..0000000 --- a/k8s_manifests/lidarr/pod.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: lidarr - labels: - app.kubernetes.io/name: lidarr -spec: - volumes: - - name: nfs-vol - nfs: - server: 192.168.0.114 - path: /mnt/test1/media/ - - name: config - persistentVolumeClaim: - claimName: config-lidarr - containers: - - name: lidarr - image: ghcr.io/hotio/lidarr:latest - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: UMASK - value: "002" - - name: TZ - value: "Etc/UTC" - ports: - - containerPort: 8686 - volumeMounts: - - name: config - mountPath: /config - - name: nfs-vol - mountPath: /media - diff --git a/k8s_manifests/plex/deployment.yaml b/k8s_manifests/plex/deployment.yaml new file mode 100644 index 0000000..09355fb --- /dev/null +++ b/k8s_manifests/plex/deployment.yaml @@ -0,0 +1,58 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: plex + labels: + app.kubernetes.io/name: plex +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: plex + template: + metadata: + labels: + app.kubernetes.io/name: plex + spec: + volumes: + - name: nfs-vol + nfs: + server: 192.168.0.114 + path: /mnt/test1/media/ + - name: transcode + persistentVolumeClaim: + claimName: transcode-plex + - name: config + persistentVolumeClaim: + claimName: config-plex + containers: + - name: plex + image: ghcr.io/hotio/plex:latest + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: UMASK + value: "002" + - name: TZ + value: "Etc/UTC" + - name: PLEX_CLAIM_TOKEN + valueFrom: + secretKeyRef: + name: plex-claim + key: PLEX_CLAIM + - name: PELX_BETA_INSTALL + value: "true" + - name: PLEX_PURGE_CODECS + value: "false" + ports: + - containerPort: 32400 + volumeMounts: + - name: config + mountPath: /config + - name: transcode + mountPath: /transcode + - name: nfs-vol + mountPath: /media + diff --git a/k8s_manifests/plex/pod.yaml b/k8s_manifests/plex/pod.yaml deleted file mode 100644 index ff61203..0000000 --- a/k8s_manifests/plex/pod.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: plex - labels: - app.kubernetes.io/name: plex -spec: - volumes: - - name: nfs-vol - nfs: - server: 192.168.0.114 - path: /mnt/test1/media/ - - name: transcode - persistentVolumeClaim: - claimName: transcode-plex - - name: config - persistentVolumeClaim: - claimName: config-plex - containers: - - name: plex - image: ghcr.io/hotio/plex:latest - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: UMASK - value: "002" - - name: TZ - value: "Etc/UTC" - - name: PLEX_CLAIM_TOKEN - valueFrom: - secretKeyRef: - name: plex-claim - key: PLEX_CLAIM - - name: PELX_BETA_INSTALL - value: "true" - - name: PLEX_PURGE_CODECS - value: "false" - ports: - - containerPort: 32400 - volumeMounts: - - name: config - mountPath: /config - - name: transcode - mountPath: /transcode - - name: nfs-vol - mountPath: /media - diff --git a/k8s_manifests/prowlarr/deployment.yaml b/k8s_manifests/prowlarr/deployment.yaml new file mode 100644 index 0000000..142af4e --- /dev/null +++ b/k8s_manifests/prowlarr/deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prowlarr + labels: + app.kubernetes.io/name: prowlarr +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: prowlarr + template: + metadata: + labels: + app.kubernetes.io/name: prowlarr + spec: + volumes: + - name: config + persistentVolumeClaim: + claimName: config-prowlarr + containers: + - name: prowlarr + image: ghcr.io/hotio/prowlarr:latest + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: UMASK + value: "002" + - name: TZ + value: "Etc/UTC" + ports: + - containerPort: 9696 + volumeMounts: + - name: config + mountPath: /config + diff --git a/k8s_manifests/prowlarr/pod.yaml b/k8s_manifests/prowlarr/pod.yaml deleted file mode 100644 index d99cbc0..0000000 --- a/k8s_manifests/prowlarr/pod.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: prowlarr - labels: - app.kubernetes.io/name: prowlarr -spec: - volumes: - - name: config - persistentVolumeClaim: - claimName: config-prowlarr - containers: - - name: prowlarr - image: ghcr.io/hotio/prowlarr:latest - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: UMASK - value: "002" - - name: TZ - value: "Etc/UTC" - ports: - - containerPort: 9696 - volumeMounts: - - name: config - mountPath: /config - diff --git a/k8s_manifests/bazarr/pvc.yaml b/k8s_manifests/pvc/bazarr.yaml similarity index 100% rename from k8s_manifests/bazarr/pvc.yaml rename to k8s_manifests/pvc/bazarr.yaml diff --git a/k8s_manifests/lidarr/pvc.yaml b/k8s_manifests/pvc/lidarr.yaml similarity index 100% rename from k8s_manifests/lidarr/pvc.yaml rename to k8s_manifests/pvc/lidarr.yaml diff --git a/k8s_manifests/plex/pvc.yaml b/k8s_manifests/pvc/plex.yaml similarity index 100% rename from k8s_manifests/plex/pvc.yaml rename to k8s_manifests/pvc/plex.yaml diff --git a/k8s_manifests/prowlarr/pvc.yaml b/k8s_manifests/pvc/prowlarr.yaml similarity index 100% rename from k8s_manifests/prowlarr/pvc.yaml rename to k8s_manifests/pvc/prowlarr.yaml diff --git a/k8s_manifests/qbittorrent/pvc.yaml b/k8s_manifests/pvc/qbittorrent.yaml similarity index 100% rename from k8s_manifests/qbittorrent/pvc.yaml rename to k8s_manifests/pvc/qbittorrent.yaml diff --git a/k8s_manifests/radarr/pvc.yaml b/k8s_manifests/pvc/radarr.yaml similarity index 100% rename from k8s_manifests/radarr/pvc.yaml rename to k8s_manifests/pvc/radarr.yaml diff --git a/k8s_manifests/sonarr/pvc.yaml b/k8s_manifests/pvc/sonarr.yaml similarity index 100% rename from k8s_manifests/sonarr/pvc.yaml rename to k8s_manifests/pvc/sonarr.yaml diff --git a/k8s_manifests/qbittorrent/deployment.yaml b/k8s_manifests/qbittorrent/deployment.yaml new file mode 100644 index 0000000..da8356d --- /dev/null +++ b/k8s_manifests/qbittorrent/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: qbittorrent + labels: + app.kubernetes.io/name: qbittorrent +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: qbittorrent + template: + metadata: + labels: + app.kubernetes.io/name: qbittorrent + spec: + volumes: + - name: nfs-vol + nfs: + server: 192.168.0.114 + path: /mnt/test1/media/ + - name: config + persistentVolumeClaim: + claimName: config-qbittorrent + containers: + - name: qbittorrent + image: ghcr.io/hotio/qbittorrent:latest + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: UMASK + value: "002" + - name: TZ + value: "Etc/UTC" + - name: WEBUI_PORTS + value: "8080/tcp,8080/udp" + ports: + - containerPort: 8080 + volumeMounts: + - name: config + mountPath: /config + - name: nfs-vol + mountPath: /media + diff --git a/k8s_manifests/qbittorrent/pod.yaml b/k8s_manifests/qbittorrent/pod.yaml deleted file mode 100644 index ef25198..0000000 --- a/k8s_manifests/qbittorrent/pod.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: qbittorrent - labels: - app.kubernetes.io/name: qbittorrent -spec: - volumes: - - name: nfs-vol - nfs: - server: 192.168.0.114 - path: /mnt/test1/media/ - - name: config - persistentVolumeClaim: - claimName: config-qbittorrent - containers: - - name: qbittorrent - image: ghcr.io/hotio/qbittorrent:latest - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: UMASK - value: "002" - - name: TZ - value: "Etc/UTC" - - name: WEBUI_PORTS - value: "8080/tcp,8080/udp" - ports: - - containerPort: 8080 - volumeMounts: - - name: config - mountPath: /config - - name: nfs-vol - mountPath: /media - diff --git a/k8s_manifests/radarr/deployment.yaml b/k8s_manifests/radarr/deployment.yaml new file mode 100644 index 0000000..767d059 --- /dev/null +++ b/k8s_manifests/radarr/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: radarr + labels: + app.kubernetes.io/name: radarr +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: radarr + template: + metadata: + labels: + app.kubernetes.io/name: radarr + spec: + volumes: + - name: nfs-vol + nfs: + server: 192.168.0.114 + path: /mnt/test1/media/ + - name: config + persistentVolumeClaim: + claimName: config-radarr + containers: + - name: radarr + image: ghcr.io/hotio/radarr:latest + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: UMASK + value: "002" + - name: TZ + value: "Etc/UTC" + ports: + - containerPort: 7878 + volumeMounts: + - name: config + mountPath: /config + - name: nfs-vol + mountPath: /media + diff --git a/k8s_manifests/radarr/pod.yaml b/k8s_manifests/radarr/pod.yaml deleted file mode 100644 index bd9f487..0000000 --- a/k8s_manifests/radarr/pod.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: radarr - labels: - app.kubernetes.io/name: radarr -spec: - volumes: - - name: nfs-vol - nfs: - server: 192.168.0.114 - path: /mnt/test1/media/ - - name: config - persistentVolumeClaim: - claimName: config-radarr - containers: - - name: radarr - image: ghcr.io/hotio/radarr:latest - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: UMASK - value: "002" - - name: TZ - value: "Etc/UTC" - ports: - - containerPort: 7878 - volumeMounts: - - name: config - mountPath: /config - - name: nfs-vol - mountPath: /media - diff --git a/k8s_manifests/sonarr/deployment.yaml b/k8s_manifests/sonarr/deployment.yaml new file mode 100644 index 0000000..25f0173 --- /dev/null +++ b/k8s_manifests/sonarr/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sonarr + labels: + app.kubernetes.io/name: sonarr +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: sonarr + template: + metadata: + labels: + app.kubernetes.io/name: sonarr + spec: + volumes: + - name: nfs-vol + nfs: + server: 192.168.0.114 + path: /mnt/test1/media/ + - name: config + persistentVolumeClaim: + claimName: config-sonarr + containers: + - name: sonarr + image: ghcr.io/hotio/sonarr:latest + env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + - name: UMASK + value: "002" + - name: TZ + value: "Etc/UTC" + ports: + - containerPort: 8989 + volumeMounts: + - name: config + mountPath: /config + - name: nfs-vol + mountPath: /media + diff --git a/k8s_manifests/sonarr/pod.yaml b/k8s_manifests/sonarr/pod.yaml deleted file mode 100644 index ca2aa96..0000000 --- a/k8s_manifests/sonarr/pod.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: sonarr - labels: - app.kubernetes.io/name: sonarr -spec: - volumes: - - name: nfs-vol - nfs: - server: 192.168.0.114 - path: /mnt/test1/media/ - - name: config - persistentVolumeClaim: - claimName: config-sonarr - containers: - - name: sonarr - image: ghcr.io/hotio/sonarr:latest - env: - - name: PUID - value: "1000" - - name: PGID - value: "1000" - - name: UMASK - value: "002" - - name: TZ - value: "Etc/UTC" - ports: - - containerPort: 8989 - volumeMounts: - - name: config - mountPath: /config - - name: nfs-vol - mountPath: /media -