migrate sonarr to kubernetes
This commit is contained in:
parent
100af46f88
commit
81eacbcfcb
3 changed files with 115 additions and 55 deletions
|
@ -24,6 +24,12 @@
|
|||
PGID = "1000";
|
||||
TZ = "Europe/Amsterdam";
|
||||
};
|
||||
|
||||
sonarr-env.data = {
|
||||
PUID = "1000";
|
||||
PGID = "1000";
|
||||
TZ = "Europe/Amsterdam";
|
||||
};
|
||||
};
|
||||
|
||||
deployments = {
|
||||
|
@ -285,6 +291,61 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
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 = [{
|
||||
containerPort = 8989;
|
||||
protocol = "TCP";
|
||||
}];
|
||||
|
||||
volumeMounts = [
|
||||
{
|
||||
name = "config";
|
||||
mountPath = "/config";
|
||||
}
|
||||
{
|
||||
name = "media";
|
||||
mountPath = "/media";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
volumes = [
|
||||
{
|
||||
name = "config";
|
||||
persistentVolumeClaim.claimName = "sonarr-config";
|
||||
}
|
||||
{
|
||||
name = "media";
|
||||
persistentVolumeClaim.claimName = "media";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
persistentVolumes = {
|
||||
|
@ -347,6 +408,16 @@
|
|||
path = "/mnt/data/nfs/prowlarr/config";
|
||||
};
|
||||
};
|
||||
|
||||
sonarr-config.spec = {
|
||||
capacity.storage = "1Mi";
|
||||
accessModes = [ "ReadWriteMany" ];
|
||||
|
||||
nfs = {
|
||||
server = "lewis.hyp";
|
||||
path = "/mnt/data/nfs/sonarr/config";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
persistentVolumeClaims = {
|
||||
|
@ -391,6 +462,13 @@
|
|||
resources.requests.storage = "1Mi";
|
||||
volumeName = "prowlarr-config";
|
||||
};
|
||||
|
||||
sonarr-config.spec = {
|
||||
accessModes = [ "ReadWriteMany" ];
|
||||
storageClassName = "";
|
||||
resources.requests.storage = "1Mi";
|
||||
volumeName = "sonarr-config";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
|
@ -474,6 +552,19 @@
|
|||
targetPort = 9696;
|
||||
}];
|
||||
};
|
||||
|
||||
sonarr.spec = {
|
||||
selector = {
|
||||
app = "media";
|
||||
component = "sonarr";
|
||||
};
|
||||
|
||||
ports = [{
|
||||
protocol = "TCP";
|
||||
port = 80;
|
||||
targetPort = 8989;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
ingresses = {
|
||||
|
@ -566,6 +657,24 @@
|
|||
}];
|
||||
}];
|
||||
};
|
||||
|
||||
sonarr.spec = {
|
||||
ingressClassName = "traefik";
|
||||
|
||||
rules = [{
|
||||
host = "sonarr.kun.is";
|
||||
|
||||
http.paths = [{
|
||||
path = "/";
|
||||
pathType = "Prefix";
|
||||
|
||||
backend.service = {
|
||||
name = "sonarr";
|
||||
port.number = 80;
|
||||
};
|
||||
}];
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Reference in a new issue