migrate bazarr to kubernetes

This commit is contained in:
Pim Kunis 2024-04-06 17:55:27 +02:00
parent 81eacbcfcb
commit 2853895822
6 changed files with 115 additions and 87 deletions

View file

@ -30,6 +30,12 @@
PGID = "1000";
TZ = "Europe/Amsterdam";
};
bazarr-env.data = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/Amsterdam";
};
};
deployments = {
@ -346,6 +352,61 @@
};
};
};
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 = [{
containerPort = 6767;
protocol = "TCP";
}];
volumeMounts = [
{
name = "config";
mountPath = "/config";
}
{
name = "media";
mountPath = "/media";
}
];
};
volumes = [
{
name = "config";
persistentVolumeClaim.claimName = "bazarr-config";
}
{
name = "media";
persistentVolumeClaim.claimName = "media";
}
];
};
};
};
};
};
persistentVolumes = {
@ -418,6 +479,16 @@
path = "/mnt/data/nfs/sonarr/config";
};
};
bazarr-config.spec = {
capacity.storage = "1Mi";
accessModes = [ "ReadWriteMany" ];
nfs = {
server = "lewis.hyp";
path = "/mnt/data/nfs/bazarr/config";
};
};
};
persistentVolumeClaims = {
@ -469,6 +540,13 @@
resources.requests.storage = "1Mi";
volumeName = "sonarr-config";
};
bazarr-config.spec = {
accessModes = [ "ReadWriteMany" ];
storageClassName = "";
resources.requests.storage = "1Mi";
volumeName = "bazarr-config";
};
};
services = {
@ -565,6 +643,19 @@
targetPort = 8989;
}];
};
bazarr.spec = {
selector = {
app = "media";
component = "bazarr";
};
ports = [{
protocol = "TCP";
port = 80;
targetPort = 6767;
}];
};
};
ingresses = {
@ -675,6 +766,24 @@
}];
}];
};
bazarr.spec = {
ingressClassName = "traefik";
rules = [{
host = "bazarr.kun.is";
http.paths = [{
path = "/";
pathType = "Prefix";
backend.service = {
name = "bazarr";
port.number = 80;
};
}];
}];
};
};
};
}