656 lines
15 KiB
Nix
656 lines
15 KiB
Nix
{ myLib, ... }: {
|
|
kubernetes.resources = {
|
|
configMaps = {
|
|
jellyfin-env.data.JELLYFIN_PublishedServerUrl = "https://media.kun.is";
|
|
transmission-env.data = {
|
|
PUID = "1000";
|
|
PGID = "1000";
|
|
TZ = "Europe/Amsterdam";
|
|
};
|
|
|
|
jellyseerr-env.data = {
|
|
LOG_LEVEL = "debug";
|
|
TZ = "Europe/Amsterdam";
|
|
};
|
|
|
|
radarr-env.data = {
|
|
PUID = "1000";
|
|
PGID = "1000";
|
|
TZ = "Europe/Amsterdam";
|
|
};
|
|
|
|
prowlarr-env.data = {
|
|
PUID = "1000";
|
|
PGID = "1000";
|
|
TZ = "Europe/Amsterdam";
|
|
};
|
|
|
|
sonarr-env.data = {
|
|
PUID = "1000";
|
|
PGID = "1000";
|
|
TZ = "Europe/Amsterdam";
|
|
};
|
|
|
|
bazarr-env.data = {
|
|
PUID = "1000";
|
|
PGID = "1000";
|
|
TZ = "Europe/Amsterdam";
|
|
};
|
|
};
|
|
|
|
deployments = {
|
|
jellyfin = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "jellyfin";
|
|
};
|
|
|
|
spec = {
|
|
selector.matchLabels = {
|
|
app = "media";
|
|
component = "jellyfin";
|
|
};
|
|
|
|
template = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "jellyfin";
|
|
};
|
|
|
|
spec = {
|
|
containers.jellyfin = {
|
|
image = "jellyfin/jellyfin:10.8.13-1";
|
|
envFrom = [{ configMapRef.name = "jellyfin-env"; }];
|
|
ports.web.containerPort = 8096;
|
|
|
|
volumeMounts = [
|
|
{
|
|
name = "config";
|
|
mountPath = "/config";
|
|
}
|
|
{
|
|
name = "media";
|
|
mountPath = "/media";
|
|
}
|
|
];
|
|
};
|
|
|
|
volumes = {
|
|
config.persistentVolumeClaim.claimName = "jellyfin-config";
|
|
media.persistentVolumeClaim.claimName = "media";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
transmission = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "transmission";
|
|
};
|
|
|
|
spec = {
|
|
selector.matchLabels = {
|
|
app = "media";
|
|
component = "transmission";
|
|
};
|
|
|
|
template = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "transmission";
|
|
};
|
|
|
|
spec = {
|
|
containers.transmission = {
|
|
image = "lscr.io/linuxserver/transmission:latest";
|
|
envFrom = [{ configMapRef.name = "transmission-env"; }];
|
|
|
|
ports = {
|
|
web.containerPort = 9091;
|
|
bittorrent.containerPort = 31780;
|
|
};
|
|
|
|
volumeMounts = [
|
|
{
|
|
name = "config";
|
|
mountPath = "/config";
|
|
}
|
|
{
|
|
name = "media";
|
|
mountPath = "/media";
|
|
}
|
|
];
|
|
};
|
|
|
|
volumes = {
|
|
config.persistentVolumeClaim.claimName = "transmission-config";
|
|
media.persistentVolumeClaim.claimName = "media";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
jellyseerr = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "jellyseerr";
|
|
};
|
|
|
|
spec = {
|
|
selector.matchLabels = {
|
|
app = "media";
|
|
component = "jellyseerr";
|
|
};
|
|
|
|
template = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "jellyseerr";
|
|
};
|
|
|
|
spec = {
|
|
volumes.config.persistentVolumeClaim.claimName = "jellyseerr-config";
|
|
|
|
containers.jellyseerr = {
|
|
image = "fallenbagel/jellyseerr:1.7.0";
|
|
envFrom = [{ configMapRef.name = "jellyseerr-env"; }];
|
|
ports.web.containerPort = 5055;
|
|
|
|
volumeMounts = [{
|
|
name = "config";
|
|
mountPath = "/app/config";
|
|
}];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
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.web.containerPort = 7878;
|
|
|
|
volumeMounts = [
|
|
{
|
|
name = "config";
|
|
mountPath = "/config";
|
|
}
|
|
{
|
|
name = "media";
|
|
mountPath = "/media";
|
|
}
|
|
];
|
|
};
|
|
|
|
volumes = {
|
|
config.persistentVolumeClaim.claimName = "radarr-config";
|
|
media.persistentVolumeClaim.claimName = "media";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
prowlarr = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "prowlarr";
|
|
};
|
|
|
|
spec = {
|
|
selector.matchLabels = {
|
|
app = "media";
|
|
component = "prowlarr";
|
|
};
|
|
|
|
template = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "prowlarr";
|
|
};
|
|
|
|
spec = {
|
|
volumes.config.persistentVolumeClaim.claimName = "prowlarr-config";
|
|
|
|
containers.prowlarr = {
|
|
image = "lscr.io/linuxserver/prowlarr:latest";
|
|
envFrom = [{ configMapRef.name = "prowlarr-env"; }];
|
|
ports.web.containerPort = 9696;
|
|
|
|
volumeMounts = [{
|
|
name = "config";
|
|
mountPath = "/config";
|
|
}];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
sonarr = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "sonarr";
|
|
};
|
|
|
|
spec = {
|
|
selector.matchLabels = {
|
|
app = "media";
|
|
component = "sonarr";
|
|
};
|
|
|
|
template = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "sonarr";
|
|
};
|
|
|
|
spec = {
|
|
containers.sonarr = {
|
|
image = "lscr.io/linuxserver/sonarr:latest";
|
|
envFrom = [{ configMapRef.name = "sonarr-env"; }];
|
|
ports.web.containerPort = 8989;
|
|
|
|
volumeMounts = [
|
|
{
|
|
name = "config";
|
|
mountPath = "/config";
|
|
}
|
|
{
|
|
name = "media";
|
|
mountPath = "/media";
|
|
}
|
|
];
|
|
};
|
|
|
|
volumes = {
|
|
config.persistentVolumeClaim.claimName = "sonarr-config";
|
|
media.persistentVolumeClaim.claimName = "media";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
bazarr = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "bazarr";
|
|
};
|
|
|
|
spec = {
|
|
selector.matchLabels = {
|
|
app = "media";
|
|
component = "bazarr";
|
|
};
|
|
|
|
template = {
|
|
metadata.labels = {
|
|
app = "media";
|
|
component = "bazarr";
|
|
};
|
|
|
|
spec = {
|
|
containers.bazarr = {
|
|
image = "lscr.io/linuxserver/bazarr:latest";
|
|
envFrom = [{ configMapRef.name = "bazarr-env"; }];
|
|
ports.web.containerPort = 6767;
|
|
|
|
volumeMounts = [
|
|
{
|
|
name = "config";
|
|
mountPath = "/config";
|
|
}
|
|
{
|
|
name = "media";
|
|
mountPath = "/media";
|
|
}
|
|
];
|
|
};
|
|
|
|
volumes = {
|
|
config.persistentVolumeClaim.claimName = "bazarr-config";
|
|
media.persistentVolumeClaim.claimName = "media";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
persistentVolumes = {
|
|
jellyfin-config.spec = {
|
|
capacity.storage = "1Mi";
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
nfs = {
|
|
server = "lewis.dmz";
|
|
path = "/mnt/data/nfs/jellyfin/config";
|
|
};
|
|
};
|
|
|
|
media.spec = {
|
|
capacity.storage = "1Mi";
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
nfs = {
|
|
server = "lewis.dmz";
|
|
path = "/mnt/data/nfs/media";
|
|
};
|
|
};
|
|
|
|
transmission-config.spec = {
|
|
capacity.storage = "1Mi";
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
nfs = {
|
|
server = "lewis.dmz";
|
|
path = "/mnt/data/nfs/transmission/config";
|
|
};
|
|
};
|
|
|
|
jellyseerr-config.spec = {
|
|
capacity.storage = "1Mi";
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
nfs = {
|
|
server = "lewis.dmz";
|
|
path = "/mnt/data/nfs/jellyseerr/config";
|
|
};
|
|
};
|
|
|
|
radarr-config.spec = {
|
|
capacity.storage = "1Mi";
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
nfs = {
|
|
server = "lewis.dmz";
|
|
path = "/mnt/data/nfs/radarr/config";
|
|
};
|
|
};
|
|
|
|
prowlarr-config.spec = {
|
|
capacity.storage = "1Mi";
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
nfs = {
|
|
server = "lewis.dmz";
|
|
path = "/mnt/data/nfs/prowlarr/config";
|
|
};
|
|
};
|
|
|
|
sonarr-config.spec = {
|
|
capacity.storage = "1Mi";
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
nfs = {
|
|
server = "lewis.dmz";
|
|
path = "/mnt/data/nfs/sonarr/config";
|
|
};
|
|
};
|
|
|
|
bazarr-config.spec = {
|
|
capacity.storage = "1Mi";
|
|
accessModes = [ "ReadWriteMany" ];
|
|
|
|
nfs = {
|
|
server = "lewis.dmz";
|
|
path = "/mnt/data/nfs/bazarr/config";
|
|
};
|
|
};
|
|
};
|
|
|
|
persistentVolumeClaims = {
|
|
jellyfin-config.spec = {
|
|
accessModes = [ "ReadWriteMany" ];
|
|
storageClassName = "";
|
|
resources.requests.storage = "1Mi";
|
|
volumeName = "jellyfin-config";
|
|
};
|
|
|
|
media.spec = {
|
|
accessModes = [ "ReadWriteMany" ];
|
|
storageClassName = "";
|
|
resources.requests.storage = "1Mi";
|
|
volumeName = "media";
|
|
};
|
|
|
|
transmission-config.spec = {
|
|
accessModes = [ "ReadWriteMany" ];
|
|
storageClassName = "";
|
|
resources.requests.storage = "1Mi";
|
|
volumeName = "transmission-config";
|
|
};
|
|
|
|
jellyseerr-config.spec = {
|
|
accessModes = [ "ReadWriteMany" ];
|
|
storageClassName = "";
|
|
resources.requests.storage = "1Mi";
|
|
volumeName = "jellyseerr-config";
|
|
};
|
|
|
|
radarr-config.spec = {
|
|
accessModes = [ "ReadWriteMany" ];
|
|
storageClassName = "";
|
|
resources.requests.storage = "1Mi";
|
|
volumeName = "radarr-config";
|
|
};
|
|
|
|
prowlarr-config.spec = {
|
|
accessModes = [ "ReadWriteMany" ];
|
|
storageClassName = "";
|
|
resources.requests.storage = "1Mi";
|
|
volumeName = "prowlarr-config";
|
|
};
|
|
|
|
sonarr-config.spec = {
|
|
accessModes = [ "ReadWriteMany" ];
|
|
storageClassName = "";
|
|
resources.requests.storage = "1Mi";
|
|
volumeName = "sonarr-config";
|
|
};
|
|
|
|
bazarr-config.spec = {
|
|
accessModes = [ "ReadWriteMany" ];
|
|
storageClassName = "";
|
|
resources.requests.storage = "1Mi";
|
|
volumeName = "bazarr-config";
|
|
};
|
|
};
|
|
|
|
services = {
|
|
jellyfin.spec = {
|
|
selector = {
|
|
app = "media";
|
|
component = "jellyfin";
|
|
};
|
|
|
|
ports.web = {
|
|
port = 80;
|
|
targetPort = "web";
|
|
};
|
|
};
|
|
|
|
transmission-web.spec = {
|
|
selector = {
|
|
app = "media";
|
|
component = "transmission";
|
|
};
|
|
|
|
ports.web = {
|
|
port = 80;
|
|
targetPort = "web";
|
|
};
|
|
};
|
|
|
|
transmission-bittorrent.spec = {
|
|
type = "LoadBalancer";
|
|
loadBalancerIP = myLib.globals.bittorrentIPv4;
|
|
|
|
selector = {
|
|
app = "media";
|
|
component = "transmission";
|
|
};
|
|
|
|
ports.bittorrent = {
|
|
port = 31780;
|
|
targetPort = "bittorrent";
|
|
};
|
|
};
|
|
|
|
jellyseerr.spec = {
|
|
selector = {
|
|
app = "media";
|
|
component = "jellyseerr";
|
|
};
|
|
|
|
ports.web = {
|
|
port = 80;
|
|
targetPort = "web";
|
|
};
|
|
};
|
|
|
|
radarr.spec = {
|
|
selector = {
|
|
app = "media";
|
|
component = "radarr";
|
|
};
|
|
|
|
ports.web = {
|
|
port = 80;
|
|
targetPort = "web";
|
|
};
|
|
};
|
|
|
|
prowlarr.spec = {
|
|
selector = {
|
|
app = "media";
|
|
component = "prowlarr";
|
|
};
|
|
|
|
ports.web = {
|
|
port = 80;
|
|
targetPort = "web";
|
|
};
|
|
};
|
|
|
|
sonarr.spec = {
|
|
selector = {
|
|
app = "media";
|
|
component = "sonarr";
|
|
};
|
|
|
|
ports.web = {
|
|
port = 80;
|
|
targetPort = "web";
|
|
};
|
|
};
|
|
|
|
bazarr.spec = {
|
|
selector = {
|
|
app = "media";
|
|
component = "bazarr";
|
|
};
|
|
|
|
ports.web = {
|
|
port = 80;
|
|
targetPort = "web";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
lab.ingresses = {
|
|
jellyfin = {
|
|
host = "media.kun.is";
|
|
|
|
service = {
|
|
name = "jellyfin";
|
|
portName = "web";
|
|
};
|
|
};
|
|
|
|
transmission = {
|
|
host = "transmission.kun.is";
|
|
entrypoint = "localsecure";
|
|
|
|
service = {
|
|
name = "transmission-web";
|
|
portName = "web";
|
|
};
|
|
};
|
|
|
|
jellyseerr = {
|
|
host = "jellyseerr.kun.is";
|
|
entrypoint = "localsecure";
|
|
|
|
service = {
|
|
name = "jellyseerr";
|
|
portName = "web";
|
|
};
|
|
};
|
|
|
|
radarr = {
|
|
host = "radarr.kun.is";
|
|
entrypoint = "localsecure";
|
|
|
|
service = {
|
|
name = "radarr";
|
|
portName = "web";
|
|
};
|
|
};
|
|
|
|
prowlarr = {
|
|
host = "prowlarr.kun.is";
|
|
entrypoint = "localsecure";
|
|
|
|
service = {
|
|
name = "prowlarr";
|
|
portName = "web";
|
|
};
|
|
};
|
|
|
|
sonarr = {
|
|
host = "sonarr.kun.is";
|
|
entrypoint = "localsecure";
|
|
|
|
service = {
|
|
name = "sonarr";
|
|
portName = "web";
|
|
};
|
|
};
|
|
|
|
bazarr = {
|
|
host = "bazarr.kun.is";
|
|
entrypoint = "localsecure";
|
|
|
|
service = {
|
|
name = "bazarr";
|
|
portName = "web";
|
|
};
|
|
};
|
|
};
|
|
}
|