migrate radarr to kubernetes

This commit is contained in:
Pim Kunis 2024-04-06 17:26:31 +02:00
parent d46e187abf
commit 75b609ea90
3 changed files with 115 additions and 30 deletions

View file

@ -49,36 +49,6 @@ volumes:
jellyfin_cache:
services:
radarr:
image: lscr.io/linuxserver/radarr:latest
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Amsterdam
volumes:
- type: volume
source: radarr_config
target: /config
volume:
nocopy: true
- type: volume
source: media
target: /media
volume:
nocopy: true
networks:
- traefik
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.radarr.entrypoints=localsecure
- traefik.http.routers.radarr.rule=Host(`radarr.kun.is`)
- traefik.http.routers.radarr.tls=true
- traefik.http.routers.radarr.tls.certresolver=letsencrypt
- traefik.http.routers.radarr.service=radarr
- traefik.http.services.radarr.loadbalancer.server.port=7878
- traefik.docker.network=traefik
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
environment:

View file

@ -138,6 +138,12 @@ services:
- traefik.http.routers.jellyseerr.rule=Host(`jellyseerr.kun.is`)
- traefik.http.routers.jellyseerr.tls=true
- traefik.http.routers.jellyseerr.tls.certresolver=letsencrypt
- traefik.http.routers.radarr.entrypoints=localsecure
- traefik.http.routers.radarr.service=k3s@file
- traefik.http.routers.radarr.rule=Host(`radarr.kun.is`)
- traefik.http.routers.radarr.tls=true
- traefik.http.routers.radarr.tls.certresolver=letsencrypt
volumes:
- type: bind
source: /var/run/docker.sock

View file

@ -12,6 +12,12 @@
LOG_LEVEL = "debug";
TZ = "Europe/Amsterdam";
};
radarr-env.data = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/Amsterdam";
};
};
deployments = {
@ -175,6 +181,61 @@
};
};
};
radarr = {
metadata.labels = {
app = "media";
component = "radarr";
};
spec = {
selector.matchLabels = {
app = "media";
component = "radarr";
};
template = {
metadata.labels = {
app = "media";
component = "radarr";
};
spec = {
containers.radarr = {
image = "lscr.io/linuxserver/radarr:latest";
envFrom = [{ configMapRef.name = "radarr-env"; }];
ports = [{
containerPort = 7878;
protocol = "TCP";
}];
volumeMounts = [
{
name = "config";
mountPath = "/config";
}
{
name = "media";
mountPath = "/media";
}
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "radarr-config";
}
{
name = "media";
persistentVolumeClaim.claimName = "media";
}
];
};
};
};
};
};
persistentVolumes = {
@ -217,6 +278,16 @@
path = "/mnt/data/nfs/jellyseerr/config";
};
};
radarr-config.spec = {
capacity.storage = "1Mi";
accessModes = [ "ReadWriteMany" ];
nfs = {
server = "lewis.hyp";
path = "/mnt/data/nfs/radarr/config";
};
};
};
persistentVolumeClaims = {
@ -247,6 +318,13 @@
resources.requests.storage = "1Mi";
volumeName = "jellyseerr-config";
};
radarr-config.spec = {
accessModes = [ "ReadWriteMany" ];
storageClassName = "";
resources.requests.storage = "1Mi";
volumeName = "radarr-config";
};
};
services = {
@ -304,6 +382,19 @@
targetPort = 5055;
}];
};
radarr.spec = {
selector = {
app = "media";
component = "radarr";
};
ports = [{
protocol = "TCP";
port = 80;
targetPort = 7878;
}];
};
};
ingresses = {
@ -360,6 +451,24 @@
}];
}];
};
radarr.spec = {
ingressClassName = "traefik";
rules = [{
host = "radarr.kun.is";
http.paths = [{
path = "/";
pathType = "Prefix";
backend.service = {
name = "radarr";
port.number = 80;
};
}];
}];
};
};
};
}