mirror of
				https://github.com/optim-enterprises-bv/homelab.git
				synced 2025-10-31 01:47:53 +00:00 
			
		
		
		
	feat(kustomize): Simple implementation of Kustomize for apps
This commit is contained in:
		| @@ -1,404 +0,0 @@ | |||||||
| --- |  | ||||||
| ## Namespace |  | ||||||
| apiVersion: v1 |  | ||||||
| kind: Namespace |  | ||||||
| metadata: |  | ||||||
|   name: arr |  | ||||||
|   labels: |  | ||||||
|     name: arr |  | ||||||
| --- |  | ||||||
| # Qbittorrent |  | ||||||
| --- |  | ||||||
| ## Service for exposing Qbittorrent |  | ||||||
| apiVersion: v1 |  | ||||||
| kind: Service |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: qbittorrent |  | ||||||
| spec: |  | ||||||
|   type: LoadBalancer |  | ||||||
|   ports: |  | ||||||
|     - name: web |  | ||||||
|       port: 8112 |  | ||||||
|     - name: a |  | ||||||
|       port: 11010 |  | ||||||
|       protocol: TCP |  | ||||||
|     - name: b |  | ||||||
|       port: 11011 |  | ||||||
|       protocol: TCP |  | ||||||
|     - name: c |  | ||||||
|       port: 11012 |  | ||||||
|       protocol: TCP |  | ||||||
|     - name: d |  | ||||||
|       port: 11013 |  | ||||||
|       protocol: TCP |  | ||||||
|     - name: e |  | ||||||
|       port: 11014 |  | ||||||
|       protocol: TCP |  | ||||||
|     - name: f |  | ||||||
|       port: 11015 |  | ||||||
|       protocol: TCP |  | ||||||
|     - name: a1 |  | ||||||
|       port: 11010 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: b1 |  | ||||||
|       port: 11011 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: c1 |  | ||||||
|       port: 11012 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: d1 |  | ||||||
|       port: 11013 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: e1 |  | ||||||
|       port: 11014 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: f1 |  | ||||||
|       port: 11015 |  | ||||||
|       protocol: UDP |  | ||||||
|   selector: |  | ||||||
|     app: qbittorrent |  | ||||||
| --- |  | ||||||
| ## Deployment for QbitTorrent |  | ||||||
| kind: Deployment |  | ||||||
| apiVersion: apps/v1 |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: qbittorrent |  | ||||||
|   labels: |  | ||||||
|     app: qbittorrent |  | ||||||
| spec: |  | ||||||
|   replicas: 1 |  | ||||||
|   selector: |  | ||||||
|     matchLabels: |  | ||||||
|       app: qbittorrent |  | ||||||
|   template: |  | ||||||
|     metadata: |  | ||||||
|       labels: |  | ||||||
|         app: qbittorrent |  | ||||||
|     spec: |  | ||||||
|       volumes: |  | ||||||
|         - name: qbittorrent-config |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/homelab/config/qbittorrent" |  | ||||||
|         - name: media-data |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/data" |  | ||||||
|       containers: |  | ||||||
|         - name: qbittorrent |  | ||||||
|           image: lscr.io/linuxserver/qbittorrent:14.3.9.99202110311443-7435-01519b5e7ubuntu20.04.1-ls166 |  | ||||||
|           volumeMounts: |  | ||||||
|             - mountPath: "/config" |  | ||||||
|               name: qbittorrent-config |  | ||||||
|             - mountPath: "/app/data" |  | ||||||
|               name: media-data |  | ||||||
|           env: |  | ||||||
|             - name: PUID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: PGID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: TZ |  | ||||||
|               value: Europe/Oslo |  | ||||||
|             - name: WEBUI_PORT |  | ||||||
|               value: "8112" |  | ||||||
|           ports: |  | ||||||
|             - name: web |  | ||||||
|               containerPort: 8112 |  | ||||||
|             - containerPort: 11010 |  | ||||||
|               protocol: TCP |  | ||||||
|             - containerPort: 11011 |  | ||||||
|               protocol: TCP |  | ||||||
|             - containerPort: 11012 |  | ||||||
|               protocol: TCP |  | ||||||
|             - containerPort: 11013 |  | ||||||
|               protocol: TCP |  | ||||||
|             - containerPort: 11014 |  | ||||||
|               protocol: TCP |  | ||||||
|             - containerPort: 11015 |  | ||||||
|               protocol: TCP |  | ||||||
|             - containerPort: 11010 |  | ||||||
|               protocol: UDP |  | ||||||
|             - containerPort: 11011 |  | ||||||
|               protocol: UDP |  | ||||||
|             - containerPort: 11012 |  | ||||||
|               protocol: UDP |  | ||||||
|             - containerPort: 11013 |  | ||||||
|               protocol: UDP |  | ||||||
|             - containerPort: 11014 |  | ||||||
|               protocol: UDP |  | ||||||
|             - containerPort: 11015 |  | ||||||
|               protocol: UDP |  | ||||||
| --- |  | ||||||
| # Prowlarr |  | ||||||
| --- |  | ||||||
| ## Service for exposing Prowlarr |  | ||||||
| apiVersion: v1 |  | ||||||
| kind: Service |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: prowlarr |  | ||||||
| spec: |  | ||||||
|   type: LoadBalancer |  | ||||||
|   ports: |  | ||||||
|     - name: web |  | ||||||
|       port: 9696 |  | ||||||
|   selector: |  | ||||||
|     app: prowlarr |  | ||||||
| --- |  | ||||||
| ## Deployment for Prowlarr |  | ||||||
| kind: Deployment |  | ||||||
| apiVersion: apps/v1 |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: prowlarr |  | ||||||
|   labels: |  | ||||||
|     app: prowlarr |  | ||||||
| spec: |  | ||||||
|   replicas: 1 |  | ||||||
|   selector: |  | ||||||
|     matchLabels: |  | ||||||
|       app: prowlarr |  | ||||||
|   template: |  | ||||||
|     metadata: |  | ||||||
|       labels: |  | ||||||
|         app: prowlarr |  | ||||||
|     spec: |  | ||||||
|       volumes: |  | ||||||
|         - name: prowlarr-config |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/homelab/config/prowlarr" |  | ||||||
|       containers: |  | ||||||
|         - name: prowlarr |  | ||||||
|           image: lscr.io/linuxserver/prowlarr:develop |  | ||||||
|           volumeMounts: |  | ||||||
|             - mountPath: "/config" |  | ||||||
|               name: prowlarr-config |  | ||||||
|           env: |  | ||||||
|             - name: PUID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: PGID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: TZ |  | ||||||
|               value: Europe/Oslo |  | ||||||
|           ports: |  | ||||||
|             - name: web |  | ||||||
|               containerPort: 9696 |  | ||||||
| --- |  | ||||||
| # Sonarr |  | ||||||
| --- |  | ||||||
| ## Service for exposing Sonarr |  | ||||||
| apiVersion: v1 |  | ||||||
| kind: Service |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: sonarr |  | ||||||
| spec: |  | ||||||
|   type: LoadBalancer |  | ||||||
|   ports: |  | ||||||
|     - name: web |  | ||||||
|       port: 8989 |  | ||||||
|   selector: |  | ||||||
|     app: sonarr |  | ||||||
| --- |  | ||||||
| ## Deployment for Sonarr |  | ||||||
| kind: Deployment |  | ||||||
| apiVersion: apps/v1 |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: sonarr |  | ||||||
|   labels: |  | ||||||
|     app: sonarr |  | ||||||
| spec: |  | ||||||
|   replicas: 1 |  | ||||||
|   selector: |  | ||||||
|     matchLabels: |  | ||||||
|       app: sonarr |  | ||||||
|   template: |  | ||||||
|     metadata: |  | ||||||
|       labels: |  | ||||||
|         app: sonarr |  | ||||||
|     spec: |  | ||||||
|       volumes: |  | ||||||
|         - name: sonarr-config |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/homelab/config/sonarr" |  | ||||||
|         - name: media-data |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/data" |  | ||||||
|       containers: |  | ||||||
|         - name: sonarr |  | ||||||
|           image: lscr.io/linuxserver/sonarr |  | ||||||
|           volumeMounts: |  | ||||||
|             - mountPath: "/config" |  | ||||||
|               name: sonarr-config |  | ||||||
|             - mountPath: "/app/data" |  | ||||||
|               name: media-data |  | ||||||
|           env: |  | ||||||
|             - name: PUID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: PGID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: TZ |  | ||||||
|               value: Europe/Oslo |  | ||||||
|           ports: |  | ||||||
|             - name: web |  | ||||||
|               containerPort: 8989 |  | ||||||
| --- |  | ||||||
| # Radarr |  | ||||||
| --- |  | ||||||
| ## Service for exposing Radarr |  | ||||||
| apiVersion: v1 |  | ||||||
| kind: Service |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: radarr |  | ||||||
| spec: |  | ||||||
|   type: LoadBalancer |  | ||||||
|   ports: |  | ||||||
|     - name: web |  | ||||||
|       port: 7878 |  | ||||||
|   selector: |  | ||||||
|     app: radarr |  | ||||||
| --- |  | ||||||
| ## Deployment for Radarr |  | ||||||
| kind: Deployment |  | ||||||
| apiVersion: apps/v1 |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: radarr |  | ||||||
|   labels: |  | ||||||
|     app: radarr |  | ||||||
| spec: |  | ||||||
|   replicas: 1 |  | ||||||
|   selector: |  | ||||||
|     matchLabels: |  | ||||||
|       app: radarr |  | ||||||
|   template: |  | ||||||
|     metadata: |  | ||||||
|       labels: |  | ||||||
|         app: radarr |  | ||||||
|     spec: |  | ||||||
|       volumes: |  | ||||||
|         - name: radarr-config |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/homelab/config/radarr" |  | ||||||
|         - name: media-data |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/data" |  | ||||||
|       containers: |  | ||||||
|         - name: radarr |  | ||||||
|           image: lscr.io/linuxserver/radarr |  | ||||||
|           volumeMounts: |  | ||||||
|             - mountPath: "/config" |  | ||||||
|               name: radarr-config |  | ||||||
|             - mountPath: "/app/data" |  | ||||||
|               name: media-data |  | ||||||
|           env: |  | ||||||
|             - name: PUID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: PGID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: TZ |  | ||||||
|               value: Europe/Oslo |  | ||||||
|           ports: |  | ||||||
|             - name: web |  | ||||||
|               containerPort: 7878 |  | ||||||
| --- |  | ||||||
| # Lidarr |  | ||||||
| --- |  | ||||||
| ## Service for exposing Lidarr |  | ||||||
| apiVersion: v1 |  | ||||||
| kind: Service |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: lidarr |  | ||||||
| spec: |  | ||||||
|   type: LoadBalancer |  | ||||||
|   ports: |  | ||||||
|     - name: web |  | ||||||
|       port: 8686 |  | ||||||
|   selector: |  | ||||||
|     app: lidarr |  | ||||||
| --- |  | ||||||
| ## Deployment for Lidarr |  | ||||||
| kind: Deployment |  | ||||||
| apiVersion: apps/v1 |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: lidarr |  | ||||||
|   labels: |  | ||||||
|     app: lidarr |  | ||||||
| spec: |  | ||||||
|   replicas: 1 |  | ||||||
|   selector: |  | ||||||
|     matchLabels: |  | ||||||
|       app: lidarr |  | ||||||
|   template: |  | ||||||
|     metadata: |  | ||||||
|       labels: |  | ||||||
|         app: lidarr |  | ||||||
|     spec: |  | ||||||
|       volumes: |  | ||||||
|         - name: lidarr-config |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/homelab/config/lidarr" |  | ||||||
|         - name: media-data |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/data" |  | ||||||
|       containers: |  | ||||||
|         - name: lidarr |  | ||||||
|           image: lscr.io/linuxserver/lidarr |  | ||||||
|           volumeMounts: |  | ||||||
|             - mountPath: "/config" |  | ||||||
|               name: lidarr-config |  | ||||||
|             - mountPath: "/app/data" |  | ||||||
|               name: media-data |  | ||||||
|           env: |  | ||||||
|             - name: PUID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: PGID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: TZ |  | ||||||
|               value: Europe/Oslo |  | ||||||
|           ports: |  | ||||||
|             - name: web |  | ||||||
|               containerPort: 8686 |  | ||||||
| --- |  | ||||||
| ## IngressRoute |  | ||||||
| --- |  | ||||||
| apiVersion: traefik.containo.us/v1alpha1 |  | ||||||
| kind: IngressRoute |  | ||||||
| metadata: |  | ||||||
|   namespace: arr |  | ||||||
|   name: ingressroute-arr |  | ||||||
| spec: |  | ||||||
|   entryPoints: |  | ||||||
|     - websecure |  | ||||||
|   routes: |  | ||||||
|     - match: Host(`torrent.stonegarden.dev`) |  | ||||||
|       kind: Rule |  | ||||||
|       services: |  | ||||||
|         - name: qbittorrent |  | ||||||
|           port: 8112 |  | ||||||
|     - match: Host(`prowlarr.stonegarden.dev`) |  | ||||||
|       kind: Rule |  | ||||||
|       services: |  | ||||||
|         - name: prowlarr |  | ||||||
|           port: 9696 |  | ||||||
|     - match: Host(`sonarr.stonegarden.dev`) |  | ||||||
|       kind: Rule |  | ||||||
|       services: |  | ||||||
|         - name: sonarr |  | ||||||
|           port: 8989 |  | ||||||
|     - match: Host(`radarr.stonegarden.dev`) |  | ||||||
|       kind: Rule |  | ||||||
|       services: |  | ||||||
|         - name: radarr |  | ||||||
|           port: 7878 |  | ||||||
|     - match: Host(`lidarr.stonegarden.dev`) |  | ||||||
|       kind: Rule |  | ||||||
|       services: |  | ||||||
|         - name: lidarr |  | ||||||
|           port: 8686 |  | ||||||
|   tls: |  | ||||||
|     certResolver: letsencrypt |  | ||||||
							
								
								
									
										53
									
								
								apps/arr/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								apps/arr/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,53 @@ | |||||||
|  | apiVersion: traefik.containo.us/v1alpha1 | ||||||
|  | kind: IngressRoute | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: ingressroute-arr | ||||||
|  | spec: | ||||||
|  |   entryPoints: | ||||||
|  |     - websecure | ||||||
|  |   routes: | ||||||
|  |     - match: Host(`auth-arr.stonegarden.dev`) | ||||||
|  |       kind: Rule | ||||||
|  |       services: | ||||||
|  |         - name: traefik-forward-auth | ||||||
|  |           port: 4181 | ||||||
|  |       middlewares: | ||||||
|  |         - name: traefik-forward-auth | ||||||
|  |     - match: Host(`torrent.stonegarden.dev`) | ||||||
|  |       kind: Rule | ||||||
|  |       services: | ||||||
|  |         - name: qbittorrent | ||||||
|  |           port: 8112 | ||||||
|  |       middlewares: | ||||||
|  |         - name: traefik-forward-auth | ||||||
|  |     - match: Host(`prowlarr.stonegarden.dev`) | ||||||
|  |       kind: Rule | ||||||
|  |       services: | ||||||
|  |         - name: prowlarr | ||||||
|  |           port: 9696 | ||||||
|  |       middlewares: | ||||||
|  |         - name: traefik-forward-auth | ||||||
|  |     - match: Host(`sonarr.stonegarden.dev`) | ||||||
|  |       kind: Rule | ||||||
|  |       services: | ||||||
|  |         - name: sonarr | ||||||
|  |           port: 8989 | ||||||
|  |       middlewares: | ||||||
|  |         - name: traefik-forward-auth | ||||||
|  |     - match: Host(`radarr.stonegarden.dev`) | ||||||
|  |       kind: Rule | ||||||
|  |       services: | ||||||
|  |         - name: radarr | ||||||
|  |           port: 7878 | ||||||
|  |       middlewares: | ||||||
|  |         - name: traefik-forward-auth | ||||||
|  |     - match: Host(`lidarr.stonegarden.dev`) | ||||||
|  |       kind: Rule | ||||||
|  |       services: | ||||||
|  |         - name: lidarr | ||||||
|  |           port: 8686 | ||||||
|  |       middlewares: | ||||||
|  |         - name: traefik-forward-auth | ||||||
|  |   tls: | ||||||
|  |     certResolver: letsencrypt | ||||||
							
								
								
									
										13
									
								
								apps/arr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								apps/arr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | namespace: arr | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - namespace.yaml | ||||||
|  |   - ingress.yaml | ||||||
|  |   - traefik-forward-auth | ||||||
|  |   - qbittorrent | ||||||
|  |   - prowlarr | ||||||
|  |   - sonarr | ||||||
|  |   - radarr | ||||||
|  |   - lidarr | ||||||
							
								
								
									
										42
									
								
								apps/arr/lidarr/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								apps/arr/lidarr/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | |||||||
|  | kind: Deployment | ||||||
|  | apiVersion: apps/v1 | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: lidarr | ||||||
|  |   labels: | ||||||
|  |     app: lidarr | ||||||
|  | spec: | ||||||
|  |   replicas: 1 | ||||||
|  |   selector: | ||||||
|  |     matchLabels: | ||||||
|  |       app: lidarr | ||||||
|  |   template: | ||||||
|  |     metadata: | ||||||
|  |       labels: | ||||||
|  |         app: lidarr | ||||||
|  |     spec: | ||||||
|  |       volumes: | ||||||
|  |         - name: lidarr-config | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/homelab/config/lidarr" | ||||||
|  |         - name: media-data | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/data" | ||||||
|  |       containers: | ||||||
|  |         - name: lidarr | ||||||
|  |           image: lscr.io/linuxserver/lidarr | ||||||
|  |           volumeMounts: | ||||||
|  |             - mountPath: "/config" | ||||||
|  |               name: lidarr-config | ||||||
|  |             - mountPath: "/app/data" | ||||||
|  |               name: media-data | ||||||
|  |           env: | ||||||
|  |             - name: PUID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: PGID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: TZ | ||||||
|  |               value: Europe/Oslo | ||||||
|  |           ports: | ||||||
|  |             - name: web | ||||||
|  |               containerPort: 8686 | ||||||
							
								
								
									
										8
									
								
								apps/arr/lidarr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								apps/arr/lidarr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | commonLabels: | ||||||
|  |   app: lidarr | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - service.yaml | ||||||
|  |   - deployment.yaml | ||||||
							
								
								
									
										12
									
								
								apps/arr/lidarr/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								apps/arr/lidarr/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Service | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: lidarr | ||||||
|  | spec: | ||||||
|  |   type: LoadBalancer | ||||||
|  |   ports: | ||||||
|  |     - name: web | ||||||
|  |       port: 8686 | ||||||
|  |   selector: | ||||||
|  |     app: lidarr | ||||||
							
								
								
									
										4
									
								
								apps/arr/namespace.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								apps/arr/namespace.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Namespace | ||||||
|  | metadata: | ||||||
|  |   name: arr | ||||||
							
								
								
									
										37
									
								
								apps/arr/prowlarr/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								apps/arr/prowlarr/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | |||||||
|  | kind: Deployment | ||||||
|  | apiVersion: apps/v1 | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: prowlarr | ||||||
|  |   labels: | ||||||
|  |     app: prowlarr | ||||||
|  | spec: | ||||||
|  |   replicas: 1 | ||||||
|  |   selector: | ||||||
|  |     matchLabels: | ||||||
|  |       app: prowlarr | ||||||
|  |   template: | ||||||
|  |     metadata: | ||||||
|  |       labels: | ||||||
|  |         app: prowlarr | ||||||
|  |     spec: | ||||||
|  |       volumes: | ||||||
|  |         - name: prowlarr-config | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/homelab/config/prowlarr" | ||||||
|  |       containers: | ||||||
|  |         - name: prowlarr | ||||||
|  |           image: lscr.io/linuxserver/prowlarr:develop | ||||||
|  |           volumeMounts: | ||||||
|  |             - mountPath: "/config" | ||||||
|  |               name: prowlarr-config | ||||||
|  |           env: | ||||||
|  |             - name: PUID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: PGID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: TZ | ||||||
|  |               value: Europe/Oslo | ||||||
|  |           ports: | ||||||
|  |             - name: web | ||||||
|  |               containerPort: 9696 | ||||||
							
								
								
									
										8
									
								
								apps/arr/prowlarr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								apps/arr/prowlarr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | commonLabels: | ||||||
|  |   app: prowlarr | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - service.yaml | ||||||
|  |   - deployment.yaml | ||||||
							
								
								
									
										12
									
								
								apps/arr/prowlarr/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								apps/arr/prowlarr/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Service | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: prowlarr | ||||||
|  | spec: | ||||||
|  |   type: LoadBalancer | ||||||
|  |   ports: | ||||||
|  |     - name: web | ||||||
|  |       port: 9696 | ||||||
|  |   selector: | ||||||
|  |     app: prowlarr | ||||||
							
								
								
									
										68
									
								
								apps/arr/qbittorrent/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								apps/arr/qbittorrent/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,68 @@ | |||||||
|  | kind: Deployment | ||||||
|  | apiVersion: apps/v1 | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: qbittorrent | ||||||
|  |   labels: | ||||||
|  |     app: qbittorrent | ||||||
|  | spec: | ||||||
|  |   replicas: 1 | ||||||
|  |   selector: | ||||||
|  |     matchLabels: | ||||||
|  |       app: qbittorrent | ||||||
|  |   template: | ||||||
|  |     metadata: | ||||||
|  |       labels: | ||||||
|  |         app: qbittorrent | ||||||
|  |     spec: | ||||||
|  |       volumes: | ||||||
|  |         - name: qbittorrent-config | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/homelab/config/qbittorrent" | ||||||
|  |         - name: media-data | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/data" | ||||||
|  |       containers: | ||||||
|  |         - name: qbittorrent | ||||||
|  |           image: lscr.io/linuxserver/qbittorrent:14.3.9.99202110311443-7435-01519b5e7ubuntu20.04.1-ls166 | ||||||
|  |           volumeMounts: | ||||||
|  |             - mountPath: "/config" | ||||||
|  |               name: qbittorrent-config | ||||||
|  |             - mountPath: "/app/data" | ||||||
|  |               name: media-data | ||||||
|  |           env: | ||||||
|  |             - name: PUID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: PGID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: TZ | ||||||
|  |               value: Europe/Oslo | ||||||
|  |             - name: WEBUI_PORT | ||||||
|  |               value: "8112" | ||||||
|  |           ports: | ||||||
|  |             - name: web | ||||||
|  |               containerPort: 8112 | ||||||
|  |             - containerPort: 11010 | ||||||
|  |               protocol: TCP | ||||||
|  |             - containerPort: 11011 | ||||||
|  |               protocol: TCP | ||||||
|  |             - containerPort: 11012 | ||||||
|  |               protocol: TCP | ||||||
|  |             - containerPort: 11013 | ||||||
|  |               protocol: TCP | ||||||
|  |             - containerPort: 11014 | ||||||
|  |               protocol: TCP | ||||||
|  |             - containerPort: 11015 | ||||||
|  |               protocol: TCP | ||||||
|  |             - containerPort: 11010 | ||||||
|  |               protocol: UDP | ||||||
|  |             - containerPort: 11011 | ||||||
|  |               protocol: UDP | ||||||
|  |             - containerPort: 11012 | ||||||
|  |               protocol: UDP | ||||||
|  |             - containerPort: 11013 | ||||||
|  |               protocol: UDP | ||||||
|  |             - containerPort: 11014 | ||||||
|  |               protocol: UDP | ||||||
|  |             - containerPort: 11015 | ||||||
|  |               protocol: UDP | ||||||
							
								
								
									
										8
									
								
								apps/arr/qbittorrent/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								apps/arr/qbittorrent/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | commonLabels: | ||||||
|  |   app: qbittorrent | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - service.yaml | ||||||
|  |   - deployment.yaml | ||||||
							
								
								
									
										48
									
								
								apps/arr/qbittorrent/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								apps/arr/qbittorrent/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,48 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Service | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: qbittorrent | ||||||
|  | spec: | ||||||
|  |   type: LoadBalancer | ||||||
|  |   ports: | ||||||
|  |     - name: web | ||||||
|  |       port: 8112 | ||||||
|  |     - name: a | ||||||
|  |       port: 11010 | ||||||
|  |       protocol: TCP | ||||||
|  |     - name: b | ||||||
|  |       port: 11011 | ||||||
|  |       protocol: TCP | ||||||
|  |     - name: c | ||||||
|  |       port: 11012 | ||||||
|  |       protocol: TCP | ||||||
|  |     - name: d | ||||||
|  |       port: 11013 | ||||||
|  |       protocol: TCP | ||||||
|  |     - name: e | ||||||
|  |       port: 11014 | ||||||
|  |       protocol: TCP | ||||||
|  |     - name: f | ||||||
|  |       port: 11015 | ||||||
|  |       protocol: TCP | ||||||
|  |     - name: a1 | ||||||
|  |       port: 11010 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: b1 | ||||||
|  |       port: 11011 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: c1 | ||||||
|  |       port: 11012 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: d1 | ||||||
|  |       port: 11013 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: e1 | ||||||
|  |       port: 11014 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: f1 | ||||||
|  |       port: 11015 | ||||||
|  |       protocol: UDP | ||||||
|  |   selector: | ||||||
|  |     app: qbittorrent | ||||||
							
								
								
									
										42
									
								
								apps/arr/radarr/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								apps/arr/radarr/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | |||||||
|  | kind: Deployment | ||||||
|  | apiVersion: apps/v1 | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: radarr | ||||||
|  |   labels: | ||||||
|  |     app: radarr | ||||||
|  | spec: | ||||||
|  |   replicas: 1 | ||||||
|  |   selector: | ||||||
|  |     matchLabels: | ||||||
|  |       app: radarr | ||||||
|  |   template: | ||||||
|  |     metadata: | ||||||
|  |       labels: | ||||||
|  |         app: radarr | ||||||
|  |     spec: | ||||||
|  |       volumes: | ||||||
|  |         - name: radarr-config | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/homelab/config/radarr" | ||||||
|  |         - name: media-data | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/data" | ||||||
|  |       containers: | ||||||
|  |         - name: radarr | ||||||
|  |           image: lscr.io/linuxserver/radarr | ||||||
|  |           volumeMounts: | ||||||
|  |             - mountPath: "/config" | ||||||
|  |               name: radarr-config | ||||||
|  |             - mountPath: "/app/data" | ||||||
|  |               name: media-data | ||||||
|  |           env: | ||||||
|  |             - name: PUID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: PGID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: TZ | ||||||
|  |               value: Europe/Oslo | ||||||
|  |           ports: | ||||||
|  |             - name: web | ||||||
|  |               containerPort: 7878 | ||||||
							
								
								
									
										8
									
								
								apps/arr/radarr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								apps/arr/radarr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | commonLabels: | ||||||
|  |   app: radarr | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - service.yaml | ||||||
|  |   - deployment.yaml | ||||||
							
								
								
									
										12
									
								
								apps/arr/radarr/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								apps/arr/radarr/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Service | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: radarr | ||||||
|  | spec: | ||||||
|  |   type: LoadBalancer | ||||||
|  |   ports: | ||||||
|  |     - name: web | ||||||
|  |       port: 7878 | ||||||
|  |   selector: | ||||||
|  |     app: radarr | ||||||
							
								
								
									
										42
									
								
								apps/arr/sonarr/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								apps/arr/sonarr/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | |||||||
|  | kind: Deployment | ||||||
|  | apiVersion: apps/v1 | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: sonarr | ||||||
|  |   labels: | ||||||
|  |     app: sonarr | ||||||
|  | spec: | ||||||
|  |   replicas: 1 | ||||||
|  |   selector: | ||||||
|  |     matchLabels: | ||||||
|  |       app: sonarr | ||||||
|  |   template: | ||||||
|  |     metadata: | ||||||
|  |       labels: | ||||||
|  |         app: sonarr | ||||||
|  |     spec: | ||||||
|  |       volumes: | ||||||
|  |         - name: sonarr-config | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/homelab/config/sonarr" | ||||||
|  |         - name: media-data | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/data" | ||||||
|  |       containers: | ||||||
|  |         - name: sonarr | ||||||
|  |           image: lscr.io/linuxserver/sonarr | ||||||
|  |           volumeMounts: | ||||||
|  |             - mountPath: "/config" | ||||||
|  |               name: sonarr-config | ||||||
|  |             - mountPath: "/app/data" | ||||||
|  |               name: media-data | ||||||
|  |           env: | ||||||
|  |             - name: PUID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: PGID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: TZ | ||||||
|  |               value: Europe/Oslo | ||||||
|  |           ports: | ||||||
|  |             - name: web | ||||||
|  |               containerPort: 8989 | ||||||
							
								
								
									
										8
									
								
								apps/arr/sonarr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								apps/arr/sonarr/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | commonLabels: | ||||||
|  |   app: sonarr | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - service.yaml | ||||||
|  |   - deployment.yaml | ||||||
							
								
								
									
										12
									
								
								apps/arr/sonarr/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								apps/arr/sonarr/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Service | ||||||
|  | metadata: | ||||||
|  |   namespace: arr | ||||||
|  |   name: sonarr | ||||||
|  | spec: | ||||||
|  |   type: LoadBalancer | ||||||
|  |   ports: | ||||||
|  |     - name: web | ||||||
|  |       port: 8989 | ||||||
|  |   selector: | ||||||
|  |     app: sonarr | ||||||
| @@ -0,0 +1,5 @@ | |||||||
|  | cookie-name = "_arr_auth" | ||||||
|  | log-level = "error" | ||||||
|  | cookie-domain = "stonegarden.dev" | ||||||
|  | auth-host = "auth-arr.stonegarden.dev" | ||||||
|  | whitelist = "veghag@gmail.com" | ||||||
							
								
								
									
										55
									
								
								apps/arr/traefik-forward-auth/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								apps/arr/traefik-forward-auth/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,55 @@ | |||||||
|  | apiVersion: apps/v1 | ||||||
|  | kind: Deployment | ||||||
|  | metadata: | ||||||
|  |   name: traefik-forward-auth | ||||||
|  |   labels: | ||||||
|  |     app: traefik-forward-auth | ||||||
|  | spec: | ||||||
|  |   replicas: 1 | ||||||
|  |   selector: | ||||||
|  |     matchLabels: | ||||||
|  |       app: traefik-forward-auth | ||||||
|  |   strategy: | ||||||
|  |     type: Recreate | ||||||
|  |   template: | ||||||
|  |     metadata: | ||||||
|  |       labels: | ||||||
|  |         app: traefik-forward-auth | ||||||
|  |     spec: | ||||||
|  |       terminationGracePeriodSeconds: 60 | ||||||
|  |       containers: | ||||||
|  |         - image: thomseddon/traefik-forward-auth:2 | ||||||
|  |           name: traefik-forward-auth | ||||||
|  |           ports: | ||||||
|  |             - containerPort: 4181 | ||||||
|  |               protocol: TCP | ||||||
|  |           env: | ||||||
|  |             - name: CONFIG | ||||||
|  |               value: "/config" | ||||||
|  |             - name: PROVIDERS_GOOGLE_CLIENT_ID | ||||||
|  |               valueFrom: | ||||||
|  |                 secretKeyRef: | ||||||
|  |                   name: traefik-forward-auth-secrets | ||||||
|  |                   key: google-client-id | ||||||
|  |             - name: PROVIDERS_GOOGLE_CLIENT_SECRET | ||||||
|  |               valueFrom: | ||||||
|  |                 secretKeyRef: | ||||||
|  |                   name: traefik-forward-auth-secrets | ||||||
|  |                   key: google-client-secret | ||||||
|  |             - name: SECRET | ||||||
|  |               valueFrom: | ||||||
|  |                 secretKeyRef: | ||||||
|  |                   name: traefik-forward-auth-secrets | ||||||
|  |                   key: secret | ||||||
|  |           volumeMounts: | ||||||
|  |             - name: configs | ||||||
|  |               mountPath: /config | ||||||
|  |               subPath: traefik-forward-auth.ini | ||||||
|  |  | ||||||
|  |       volumes: | ||||||
|  |         - name: configs | ||||||
|  |           configMap: | ||||||
|  |             name: configs | ||||||
|  |         - name: traefik-forward-auth-secrets | ||||||
|  |           secret: | ||||||
|  |             secretName: traefik-forward-auth-secrets | ||||||
							
								
								
									
										25
									
								
								apps/arr/traefik-forward-auth/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								apps/arr/traefik-forward-auth/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | commonLabels: | ||||||
|  |   app: traefik-forward-auth | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - deployment.yaml | ||||||
|  |   - service.yaml | ||||||
|  |   - middleware.yaml | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # Configs | ||||||
|  | # | ||||||
|  | configMapGenerator: | ||||||
|  |   - name: configs | ||||||
|  |     files: | ||||||
|  |       - configs/traefik-forward-auth.ini | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # Secrets | ||||||
|  | # | ||||||
|  | secretGenerator: | ||||||
|  |   - name: traefik-forward-auth-secrets | ||||||
|  |     envs: | ||||||
|  |     - secrets/traefik-forward-auth.env | ||||||
							
								
								
									
										10
									
								
								apps/arr/traefik-forward-auth/middleware.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								apps/arr/traefik-forward-auth/middleware.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | |||||||
|  | apiVersion: traefik.containo.us/v1alpha1 | ||||||
|  | kind: Middleware | ||||||
|  | metadata: | ||||||
|  |   name: traefik-forward-auth | ||||||
|  | spec: | ||||||
|  |   forwardAuth: | ||||||
|  |     address: http://traefik-forward-auth.arr.svc.cluster.local:4181 | ||||||
|  |     authResponseHeaders: | ||||||
|  |       - X-Forwarded-User | ||||||
|  |     trustForwardHeader: true | ||||||
							
								
								
									
										16
									
								
								apps/arr/traefik-forward-auth/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								apps/arr/traefik-forward-auth/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | # | ||||||
|  | # Auth Service | ||||||
|  | # | ||||||
|  | apiVersion: v1 | ||||||
|  | kind: Service | ||||||
|  | metadata: | ||||||
|  |   name: traefik-forward-auth | ||||||
|  |   labels: | ||||||
|  |     app: traefik-forward-auth | ||||||
|  | spec: | ||||||
|  |   type: ClusterIP | ||||||
|  |   selector: | ||||||
|  |     app: traefik-forward-auth | ||||||
|  |   ports: | ||||||
|  |     - name: auth-http | ||||||
|  |       port: 4181 | ||||||
| @@ -1,227 +0,0 @@ | |||||||
| --- |  | ||||||
| ## Namespace |  | ||||||
| apiVersion: v1 |  | ||||||
| kind: Namespace |  | ||||||
| metadata: |  | ||||||
|   name: plex |  | ||||||
|   labels: |  | ||||||
|     name: plex |  | ||||||
|  |  | ||||||
| --- |  | ||||||
| ### StorageClass for config |  | ||||||
| #apiVersion: storage.k8s.io/v1 |  | ||||||
| #kind: StorageClass |  | ||||||
| #metadata: |  | ||||||
| #  name: plex-config |  | ||||||
| #provisioner: kubernetes.io/no-provisioner |  | ||||||
| #volumeBindingMode: WaitForFirstConsumer |  | ||||||
| #--- |  | ||||||
| ### Config |  | ||||||
| #apiVersion: v1 |  | ||||||
| #kind: PersistentVolume |  | ||||||
| #metadata: |  | ||||||
| #  name: plex-config-pv |  | ||||||
| #spec: |  | ||||||
| #  capacity: |  | ||||||
| #    storage: 2Gi |  | ||||||
| #  volumeMode: Filesystem |  | ||||||
| #  accessModes: |  | ||||||
| #    - ReadWriteOnce |  | ||||||
| #  persistentVolumeReclaimPolicy: Retain |  | ||||||
| #  storageClassName: plex-config |  | ||||||
| #  local: |  | ||||||
| #    path: "/mnt/sdb1/homelab/config/plex" |  | ||||||
| #  nodeAffinity: |  | ||||||
| #    required: |  | ||||||
| #      nodeSelectorTerms: |  | ||||||
| #        - matchExpressions: |  | ||||||
| #            - key: kubernetes.io/hostname |  | ||||||
| #              operator: In |  | ||||||
| #              values: |  | ||||||
| #                - ratatoskr |  | ||||||
| #--- |  | ||||||
| ### Persistent Volume Claim for config |  | ||||||
| #apiVersion: v1 |  | ||||||
| #kind: PersistentVolumeClaim |  | ||||||
| #metadata: |  | ||||||
| #  name: plex-config |  | ||||||
| #spec: |  | ||||||
| #  storageClassName: plex-config |  | ||||||
| #  accessModes: |  | ||||||
| #    - ReadWriteOnce |  | ||||||
| #  resources: |  | ||||||
| #    requests: |  | ||||||
| #      storage: 2Gi |  | ||||||
| #--- |  | ||||||
| ### StorageClass for media-data |  | ||||||
| #apiVersion: storage.k8s.io/v1 |  | ||||||
| #kind: StorageClass |  | ||||||
| #metadata: |  | ||||||
| #  name: media-data |  | ||||||
| #provisioner: kubernetes.io/no-provisioner |  | ||||||
| #volumeBindingMode: WaitForFirstConsumer |  | ||||||
| #--- |  | ||||||
| ### PersistentVolume for media-data |  | ||||||
| #apiVersion: v1 |  | ||||||
| #kind: PersistentVolume |  | ||||||
| #metadata: |  | ||||||
| #  name: media-data-pv |  | ||||||
| #spec: |  | ||||||
| #  capacity: |  | ||||||
| #    storage: 1.8Ti |  | ||||||
| #  volumeMode: Filesystem |  | ||||||
| #  accessModes: |  | ||||||
| #    - ReadWriteOnce |  | ||||||
| #  persistentVolumeReclaimPolicy: Retain |  | ||||||
| #  storageClassName: media-data |  | ||||||
| #  local: |  | ||||||
| #    path: "/mnt/sdb1/data" |  | ||||||
| #  nodeAffinity: |  | ||||||
| #    required: |  | ||||||
| #      nodeSelectorTerms: |  | ||||||
| #        - matchExpressions: |  | ||||||
| #            - key: kubernetes.io/hostname |  | ||||||
| #              operator: In |  | ||||||
| #              values: |  | ||||||
| #                - ratatoskr |  | ||||||
| #--- |  | ||||||
| ### Persistent Volume Claim for media-data |  | ||||||
| #apiVersion: v1 |  | ||||||
| #kind: PersistentVolumeClaim |  | ||||||
| #metadata: |  | ||||||
| #  name: media-data |  | ||||||
| #spec: |  | ||||||
| #  storageClassName: media-data |  | ||||||
| #  accessModes: |  | ||||||
| #    - ReadWriteOnce |  | ||||||
| #  resources: |  | ||||||
| #    requests: |  | ||||||
| #      storage: 1.8Ti |  | ||||||
| --- |  | ||||||
| ## Service for exposing Plex |  | ||||||
| apiVersion: v1 |  | ||||||
| kind: Service |  | ||||||
| metadata: |  | ||||||
|   namespace: plex |  | ||||||
|   name: plex |  | ||||||
| spec: |  | ||||||
|   type: LoadBalancer |  | ||||||
|   ports: |  | ||||||
|     - name: web |  | ||||||
|       port: 32400 |  | ||||||
|     - name: a |  | ||||||
|       port: 1900 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: b |  | ||||||
|       port: 3005 |  | ||||||
|     - name: c |  | ||||||
|       port: 8324 |  | ||||||
|     - name: d |  | ||||||
|       port: 32410 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: e |  | ||||||
|       port: 32412 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: f |  | ||||||
|       port: 32413 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: g |  | ||||||
|       port: 32414 |  | ||||||
|       protocol: UDP |  | ||||||
|     - name: h |  | ||||||
|       port: 32469 |  | ||||||
|   selector: |  | ||||||
|     app: plex |  | ||||||
| --- |  | ||||||
| ## Deployment for Plex |  | ||||||
| kind: Deployment |  | ||||||
| apiVersion: apps/v1 |  | ||||||
| metadata: |  | ||||||
|   namespace: plex |  | ||||||
|   name: plex |  | ||||||
|   labels: |  | ||||||
|     app: plex |  | ||||||
| spec: |  | ||||||
|   replicas: 1 |  | ||||||
|   selector: |  | ||||||
|     matchLabels: |  | ||||||
|       app: plex |  | ||||||
|   template: |  | ||||||
|     metadata: |  | ||||||
|       labels: |  | ||||||
|         app: plex |  | ||||||
|     spec: |  | ||||||
|       volumes: |  | ||||||
|         - name: plex-config |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/homelab/config/plex" |  | ||||||
|         - name: media-data |  | ||||||
|           hostPath: |  | ||||||
|             path: "/mnt/sdb1/data" |  | ||||||
|         #- name: plex-config-pv |  | ||||||
|         #  persistentVolumeClaim: |  | ||||||
|         #    claimName: plex-config |  | ||||||
|         #- name: media-data-pv |  | ||||||
|         #  persistentVolumeClaim: |  | ||||||
|         #    claimName: media-data |  | ||||||
|       containers: |  | ||||||
|         - name: plex |  | ||||||
|           image: lscr.io/linuxserver/plex |  | ||||||
|           volumeMounts: |  | ||||||
|             - mountPath: "/config" |  | ||||||
|               name: plex-config |  | ||||||
|             - mountPath: "/app/data" |  | ||||||
|               name: media-data |  | ||||||
|             #- mountPath: "/config" |  | ||||||
|             #  name: plex-config-pv |  | ||||||
|             #- mountPath: "/app/data" |  | ||||||
|             #  name: media-data-pv |  | ||||||
|           env: |  | ||||||
|             - name: PUID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: PGID |  | ||||||
|               value: "1000" |  | ||||||
|             - name: TZ |  | ||||||
|               value: Europe/Oslo |  | ||||||
|           ports: |  | ||||||
|             - name: web |  | ||||||
|               containerPort: 32400 |  | ||||||
|             - name: a |  | ||||||
|               containerPort: 1900 |  | ||||||
|               protocol: UDP |  | ||||||
|             - name: b |  | ||||||
|               containerPort: 3005 |  | ||||||
|             - name: c |  | ||||||
|               containerPort: 8324 |  | ||||||
|             - name: d |  | ||||||
|               containerPort: 32410 |  | ||||||
|               protocol: UDP |  | ||||||
|             - name: e |  | ||||||
|               containerPort: 32412 |  | ||||||
|               protocol: UDP |  | ||||||
|             - name: f |  | ||||||
|               containerPort: 32413 |  | ||||||
|               protocol: UDP |  | ||||||
|             - name: g |  | ||||||
|               containerPort: 32414 |  | ||||||
|               protocol: UDP |  | ||||||
|             - name: h |  | ||||||
|               containerPort: 32469 |  | ||||||
| --- |  | ||||||
| ## IngressRoute for Plex |  | ||||||
| apiVersion: traefik.containo.us/v1alpha1 |  | ||||||
| kind: IngressRoute |  | ||||||
| metadata: |  | ||||||
|   name: ingressroute-plex |  | ||||||
|   namespace: plex |  | ||||||
| spec: |  | ||||||
|   entryPoints: |  | ||||||
|     - websecure |  | ||||||
|   routes: |  | ||||||
|     - match: Host(`plex.stonegarden.dev`) |  | ||||||
|       kind: Rule |  | ||||||
|       services: |  | ||||||
|         - name: plex |  | ||||||
|           port: 32400 |  | ||||||
|   tls: |  | ||||||
|     certResolver: letsencrypt |  | ||||||
							
								
								
									
										73
									
								
								apps/plex/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								apps/plex/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,73 @@ | |||||||
|  | kind: Deployment | ||||||
|  | apiVersion: apps/v1 | ||||||
|  | metadata: | ||||||
|  |   namespace: plex | ||||||
|  |   name: plex | ||||||
|  |   labels: | ||||||
|  |     app: plex | ||||||
|  | spec: | ||||||
|  |   replicas: 1 | ||||||
|  |   selector: | ||||||
|  |     matchLabels: | ||||||
|  |       app: plex | ||||||
|  |   template: | ||||||
|  |     metadata: | ||||||
|  |       labels: | ||||||
|  |         app: plex | ||||||
|  |     spec: | ||||||
|  |       volumes: | ||||||
|  |         - name: plex-config | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/homelab/config/plex" | ||||||
|  |         - name: media-data | ||||||
|  |           hostPath: | ||||||
|  |             path: "/mnt/sdb1/data" | ||||||
|  |         #- name: plex-config-pv | ||||||
|  |         #  persistentVolumeClaim: | ||||||
|  |         #    claimName: plex-config | ||||||
|  |         #- name: media-data-pv | ||||||
|  |         #  persistentVolumeClaim: | ||||||
|  |         #    claimName: media-data | ||||||
|  |       containers: | ||||||
|  |         - name: plex | ||||||
|  |           image: lscr.io/linuxserver/plex | ||||||
|  |           volumeMounts: | ||||||
|  |             - mountPath: "/config" | ||||||
|  |               name: plex-config | ||||||
|  |             - mountPath: "/app/data" | ||||||
|  |               name: media-data | ||||||
|  |             #- mountPath: "/config" | ||||||
|  |             #  name: plex-config-pv | ||||||
|  |             #- mountPath: "/app/data" | ||||||
|  |             #  name: media-data-pv | ||||||
|  |           env: | ||||||
|  |             - name: PUID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: PGID | ||||||
|  |               value: "1000" | ||||||
|  |             - name: TZ | ||||||
|  |               value: Europe/Oslo | ||||||
|  |           ports: | ||||||
|  |             - name: web | ||||||
|  |               containerPort: 32400 | ||||||
|  |             - name: a | ||||||
|  |               containerPort: 1900 | ||||||
|  |               protocol: UDP | ||||||
|  |             - name: b | ||||||
|  |               containerPort: 3005 | ||||||
|  |             - name: c | ||||||
|  |               containerPort: 8324 | ||||||
|  |             - name: d | ||||||
|  |               containerPort: 32410 | ||||||
|  |               protocol: UDP | ||||||
|  |             - name: e | ||||||
|  |               containerPort: 32412 | ||||||
|  |               protocol: UDP | ||||||
|  |             - name: f | ||||||
|  |               containerPort: 32413 | ||||||
|  |               protocol: UDP | ||||||
|  |             - name: g | ||||||
|  |               containerPort: 32414 | ||||||
|  |               protocol: UDP | ||||||
|  |             - name: h | ||||||
|  |               containerPort: 32469 | ||||||
							
								
								
									
										16
									
								
								apps/plex/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								apps/plex/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | apiVersion: traefik.containo.us/v1alpha1 | ||||||
|  | kind: IngressRoute | ||||||
|  | metadata: | ||||||
|  |   name: ingressroute-plex | ||||||
|  |   namespace: plex | ||||||
|  | spec: | ||||||
|  |   entryPoints: | ||||||
|  |     - websecure | ||||||
|  |   routes: | ||||||
|  |     - match: Host(`plex.stonegarden.dev`) | ||||||
|  |       kind: Rule | ||||||
|  |       services: | ||||||
|  |         - name: plex | ||||||
|  |           port: 32400 | ||||||
|  |   tls: | ||||||
|  |     certResolver: letsencrypt | ||||||
							
								
								
									
										11
									
								
								apps/plex/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								apps/plex/kustomization.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | |||||||
|  | apiVersion: kustomize.config.k8s.io/v1beta1 | ||||||
|  | kind: Kustomization | ||||||
|  | namespace: arr | ||||||
|  |  | ||||||
|  | resources: | ||||||
|  |   - namespace.yaml | ||||||
|  | #  - pv.yaml | ||||||
|  | #  - pvc.yaml | ||||||
|  |   - service.yaml | ||||||
|  |   - deployment.yaml | ||||||
|  |   - ingress.yaml | ||||||
							
								
								
									
										6
									
								
								apps/plex/namespace.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								apps/plex/namespace.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Namespace | ||||||
|  | metadata: | ||||||
|  |   name: plex | ||||||
|  |   labels: | ||||||
|  |     name: plex | ||||||
							
								
								
									
										45
									
								
								apps/plex/pv.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								apps/plex/pv.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: PersistentVolume | ||||||
|  | metadata: | ||||||
|  |   name: plex-config-pv | ||||||
|  | spec: | ||||||
|  |   capacity: | ||||||
|  |     storage: 2Gi | ||||||
|  |   volumeMode: Filesystem | ||||||
|  |   accessModes: | ||||||
|  |     - ReadWriteOnce | ||||||
|  |   persistentVolumeReclaimPolicy: Retain | ||||||
|  |   storageClassName: plex-config | ||||||
|  |   local: | ||||||
|  |     path: "/mnt/sdb1/homelab/config/plex" | ||||||
|  |   nodeAffinity: | ||||||
|  |     required: | ||||||
|  |       nodeSelectorTerms: | ||||||
|  |         - matchExpressions: | ||||||
|  |             - key: kubernetes.io/hostname | ||||||
|  |               operator: In | ||||||
|  |               values: | ||||||
|  |                 - ratatoskr | ||||||
|  | --- | ||||||
|  | apiVersion: v1 | ||||||
|  | kind: PersistentVolume | ||||||
|  | metadata: | ||||||
|  |   name: media-data-pv | ||||||
|  | spec: | ||||||
|  |   capacity: | ||||||
|  |     storage: 1.8Ti | ||||||
|  |   volumeMode: Filesystem | ||||||
|  |   accessModes: | ||||||
|  |     - ReadWriteOnce | ||||||
|  |   persistentVolumeReclaimPolicy: Retain | ||||||
|  |   storageClassName: media-data | ||||||
|  |   local: | ||||||
|  |     path: "/mnt/sdb1/data" | ||||||
|  |   nodeAffinity: | ||||||
|  |     required: | ||||||
|  |       nodeSelectorTerms: | ||||||
|  |         - matchExpressions: | ||||||
|  |             - key: kubernetes.io/hostname | ||||||
|  |               operator: In | ||||||
|  |               values: | ||||||
|  |                 - ratatoskr | ||||||
							
								
								
									
										23
									
								
								apps/plex/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								apps/plex/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: PersistentVolumeClaim | ||||||
|  | metadata: | ||||||
|  |   name: plex-config | ||||||
|  | spec: | ||||||
|  |   storageClassName: plex-config | ||||||
|  |   accessModes: | ||||||
|  |     - ReadWriteOnce | ||||||
|  |   resources: | ||||||
|  |     requests: | ||||||
|  |       storage: 2Gi | ||||||
|  | --- | ||||||
|  | apiVersion: v1 | ||||||
|  | kind: PersistentVolumeClaim | ||||||
|  | metadata: | ||||||
|  |   name: media-data | ||||||
|  | spec: | ||||||
|  |   storageClassName: media-data | ||||||
|  |   accessModes: | ||||||
|  |     - ReadWriteOnce | ||||||
|  |   resources: | ||||||
|  |     requests: | ||||||
|  |       storage: 1.8Ti | ||||||
							
								
								
									
										13
									
								
								apps/plex/sc.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								apps/plex/sc.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | apiVersion: storage.k8s.io/v1 | ||||||
|  | kind: StorageClass | ||||||
|  | metadata: | ||||||
|  |   name: plex-config | ||||||
|  | provisioner: kubernetes.io/no-provisioner | ||||||
|  | volumeBindingMode: WaitForFirstConsumer | ||||||
|  | --- | ||||||
|  | apiVersion: storage.k8s.io/v1 | ||||||
|  | kind: StorageClass | ||||||
|  | metadata: | ||||||
|  |   name: media-data | ||||||
|  | provisioner: kubernetes.io/no-provisioner | ||||||
|  | volumeBindingMode: WaitForFirstConsumer | ||||||
							
								
								
									
										33
									
								
								apps/plex/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								apps/plex/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | |||||||
|  | apiVersion: v1 | ||||||
|  | kind: Service | ||||||
|  | metadata: | ||||||
|  |   namespace: plex | ||||||
|  |   name: plex | ||||||
|  | spec: | ||||||
|  |   type: LoadBalancer | ||||||
|  |   ports: | ||||||
|  |     - name: web | ||||||
|  |       port: 32400 | ||||||
|  |     - name: a | ||||||
|  |       port: 1900 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: b | ||||||
|  |       port: 3005 | ||||||
|  |     - name: c | ||||||
|  |       port: 8324 | ||||||
|  |     - name: d | ||||||
|  |       port: 32410 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: e | ||||||
|  |       port: 32412 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: f | ||||||
|  |       port: 32413 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: g | ||||||
|  |       port: 32414 | ||||||
|  |       protocol: UDP | ||||||
|  |     - name: h | ||||||
|  |       port: 32469 | ||||||
|  |   selector: | ||||||
|  |     app: plex | ||||||
		Reference in New Issue
	
	Block a user
	 Vegard Hagen
					Vegard Hagen