Use nodeSelector instead affinity for media stack
This commit is contained in:
parent
34498046b8
commit
aa47c9f27a
1 changed files with 14 additions and 84 deletions
|
@ -44,6 +44,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
spec = {
|
spec = {
|
||||||
|
nodeSelector."kubernetes.io/hostname" = "lewis";
|
||||||
|
|
||||||
containers.jellyfin = {
|
containers.jellyfin = {
|
||||||
image = globals.images.jellyfin;
|
image = globals.images.jellyfin;
|
||||||
ports.web.containerPort = 8096;
|
ports.web.containerPort = 8096;
|
||||||
|
@ -89,18 +91,6 @@ in {
|
||||||
type = "Directory";
|
type = "Directory";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [
|
|
||||||
{
|
|
||||||
matchExpressions = [
|
|
||||||
{
|
|
||||||
key = "hasMedia";
|
|
||||||
operator = "In";
|
|
||||||
values = ["true"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -129,6 +119,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
spec = {
|
spec = {
|
||||||
|
nodeSelector."kubernetes.io/hostname" = "lewis";
|
||||||
|
|
||||||
containers.deluge = {
|
containers.deluge = {
|
||||||
image = utils.mkNixNGImage "deluge";
|
image = utils.mkNixNGImage "deluge";
|
||||||
imagePullPolicy = "IfNotPresent";
|
imagePullPolicy = "IfNotPresent";
|
||||||
|
@ -168,18 +160,6 @@ in {
|
||||||
type = "Directory";
|
type = "Directory";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [
|
|
||||||
{
|
|
||||||
matchExpressions = [
|
|
||||||
{
|
|
||||||
key = "hasMedia";
|
|
||||||
operator = "In";
|
|
||||||
values = ["true"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -208,6 +188,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
spec = {
|
spec = {
|
||||||
|
nodeSelector."kubernetes.io/hostname" = "lewis";
|
||||||
|
|
||||||
volumes.config.hostPath = {
|
volumes.config.hostPath = {
|
||||||
path = "/mnt/longhorn/persistent/volumes/jellyseerr";
|
path = "/mnt/longhorn/persistent/volumes/jellyseerr";
|
||||||
type = "Directory";
|
type = "Directory";
|
||||||
|
@ -230,18 +212,6 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [
|
|
||||||
{
|
|
||||||
matchExpressions = [
|
|
||||||
{
|
|
||||||
key = "hasMedia";
|
|
||||||
operator = "In";
|
|
||||||
values = ["true"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -270,6 +240,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
spec = {
|
spec = {
|
||||||
|
nodeSelector."kubernetes.io/hostname" = "lewis";
|
||||||
|
|
||||||
containers.radarr = {
|
containers.radarr = {
|
||||||
image = utils.mkNixNGImage "radarr";
|
image = utils.mkNixNGImage "radarr";
|
||||||
ports.web.containerPort = 7878;
|
ports.web.containerPort = 7878;
|
||||||
|
@ -304,18 +276,6 @@ in {
|
||||||
type = "Directory";
|
type = "Directory";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [
|
|
||||||
{
|
|
||||||
matchExpressions = [
|
|
||||||
{
|
|
||||||
key = "hasMedia";
|
|
||||||
operator = "In";
|
|
||||||
values = ["true"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -344,23 +304,13 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
spec = {
|
spec = {
|
||||||
|
nodeSelector."kubernetes.io/hostname" = "lewis";
|
||||||
|
|
||||||
volumes.config.hostPath = {
|
volumes.config.hostPath = {
|
||||||
path = "/mnt/longhorn/persistent/volumes/prowlarr";
|
path = "/mnt/longhorn/persistent/volumes/prowlarr";
|
||||||
type = "Directory";
|
type = "Directory";
|
||||||
};
|
};
|
||||||
|
|
||||||
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [
|
|
||||||
{
|
|
||||||
matchExpressions = [
|
|
||||||
{
|
|
||||||
key = "hasMedia";
|
|
||||||
operator = "In";
|
|
||||||
values = ["true"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
containers.prowlarr = {
|
containers.prowlarr = {
|
||||||
image = utils.mkNixNGImage "prowlarr";
|
image = utils.mkNixNGImage "prowlarr";
|
||||||
ports.web.containerPort = 9696;
|
ports.web.containerPort = 9696;
|
||||||
|
@ -407,6 +357,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
spec = {
|
spec = {
|
||||||
|
nodeSelector."kubernetes.io/hostname" = "lewis";
|
||||||
|
|
||||||
containers.sonarr = {
|
containers.sonarr = {
|
||||||
image = utils.mkNixNGImage "sonarr";
|
image = utils.mkNixNGImage "sonarr";
|
||||||
ports.web.containerPort = 8989;
|
ports.web.containerPort = 8989;
|
||||||
|
@ -441,18 +393,6 @@ in {
|
||||||
type = "Directory";
|
type = "Directory";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [
|
|
||||||
{
|
|
||||||
matchExpressions = [
|
|
||||||
{
|
|
||||||
key = "hasMedia";
|
|
||||||
operator = "In";
|
|
||||||
values = ["true"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -481,6 +421,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
spec = {
|
spec = {
|
||||||
|
nodeSelector."kubernetes.io/hostname" = "lewis";
|
||||||
|
|
||||||
containers.bazarr = {
|
containers.bazarr = {
|
||||||
image = utils.mkNixNGImage "bazarr";
|
image = utils.mkNixNGImage "bazarr";
|
||||||
ports.web.containerPort = 6767;
|
ports.web.containerPort = 6767;
|
||||||
|
@ -515,18 +457,6 @@ in {
|
||||||
type = "Directory";
|
type = "Directory";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [
|
|
||||||
{
|
|
||||||
matchExpressions = [
|
|
||||||
{
|
|
||||||
key = "hasMedia";
|
|
||||||
operator = "In";
|
|
||||||
values = ["true"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue