initial refactor

This commit is contained in:
2025-06-07 16:33:55 -04:00
parent 5ac011f02b
commit b09446668d
249 changed files with 74 additions and 186 deletions

View File

@@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sabnzbd
namespace: media
spec:
selector:
matchLabels:
app: sabnzbd
template:
metadata:
labels:
app: sabnzbd
spec:
containers:
- name: sabnzbd
image: lscr.io/linuxserver/sabnzbd:latest
envFrom:
- configMapRef:
name: sabnzbd-config
optional: false
ports:
- containerPort: 8080
name: http
protocol: TCP
volumeMounts:
- name: sabnzbd-config
mountPath: /config
- name: data
mountPath: /data/usenet
subPath: usenet
- name: sabnzbd-incomplete
mountPath: /incomplete
volumes:
- name: sabnzbd-config
persistentVolumeClaim:
claimName: sabnzbd-config
- name: data
persistentVolumeClaim:
claimName: media-data
- name: sabnzbd-incomplete
emptyDir:
sizeLimit: 50Gi

View File

@@ -0,0 +1,12 @@
apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
name: sabnzbd.michaelthomson.dev
namespace: media
spec:
endpoints:
- dnsName: sabnzbd.michaelthomson.dev
recordTTL: 180
recordType: CNAME
targets:
- server.michaelthomson.dev

View File

@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: sabnzbd
namespace: media
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
rules:
- host: sabnzbd.michaelthomson.dev
http:
paths:
- pathType: ImplementationSpecific
path: /
backend:
service:
name: sabnzbd
port:
name: http
tls:
- hosts:
- sabnzbd.michaelthomson.dev
secretName: letsencrypt-wildcard-cert-michaelthomson.dev

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sabnzbd-config
namespace: media
spec:
resources:
requests:
storage: 1Gi
storageClassName: longhorn
accessModes:
- ReadWriteOnce

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: sabnzbd-config
namespace: media
data:
PUID: "1000"
PGID: "1000"
TZ: "America/Toronto"

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: sabnzbd
namespace: media
spec:
selector:
app: sabnzbd
ports:
- port: 80
targetPort: http
name: http