feat: Expose longhorn UI on tailnet

refactor: Merge inbucket services
This commit is contained in:
Pim Kunis 2024-07-21 20:30:47 +02:00
parent e129d5cf8d
commit 6152ce4577
4 changed files with 30 additions and 52 deletions

View file

@ -1,4 +1,4 @@
{ lib, nixhelm, system, machines, ... }: {
{ lib, nixhelm, system, machines, myLib, ... }: {
kubernetes = {
helm.releases = {
metallb = {
@ -17,6 +17,7 @@
values = {
persistence.defaultClassReplicaCount = 2;
service.ui.type = "LoadBalancer";
defaultSettings = {
defaultDataPath = "/mnt/longhorn";
@ -29,6 +30,8 @@
};
resources = {
services.longhorn-frontend.spec.loadBalancerIP = myLib.globals.longhornIPv4;
namespaces = {
static-websites = { };
freshrss = { };
@ -60,36 +63,6 @@
})
machinesWithKubernetesLabels;
ingresses.longhorn = {
metadata.annotations = {
"cert-manager.io/cluster-issuer" = "letsencrypt";
"traefik.ingress.kubernetes.io/router.entrypoints" = "localsecure";
};
spec = {
ingressClassName = "traefik";
rules = [{
host = "longhorn.kun.is";
http.paths = [{
path = "/";
pathType = "Prefix";
backend.service = {
name = "longhorn-frontend";
port.number = 80;
};
}];
}];
tls = [{
secretName = "longhorn-tls";
hosts = [ "longhorn.kun.is" ];
}];
};
};
recurringJobs.backup-nfs.spec = {
cron = "0 1 * * *"; # One o'clock at night
task = "backup";
@ -155,5 +128,14 @@
bazarr.storage = "25Mi";
minecraft.storage = "1Gi";
};
tailscaleIngresses.tailscale-longhorn = {
host = "longhorn";
service = {
name = "longhorn-frontend";
portName = "http";
};
};
};
}

View file

@ -26,32 +26,28 @@
};
services = {
web.spec = {
inbucket.spec = {
type = "LoadBalancer";
loadBalancerIP = myLib.globals.inbucketWebIPv4;
loadBalancerIP = myLib.globals.inbucketIPv4;
selector.app = "inbucket";
ports.web = {
port = 80;
targetPort = "web";
ports = {
smtp = {
port = 25;
targetPort = "smtp";
};
web = {
port = 80;
targetPort = "web";
};
};
};
email.spec = {
type = "LoadBalancer";
loadBalancerIP = myLib.globals.inbucketEmailIPv4;
selector.app = "inbucket";
ports = [{
port = 25;
targetPort = "smtp";
}];
};
};
};
lab.tailscaleIngresses.tailscale = {
host = "inbucket";
service.name = "web";
service.name = "inbucket";
};
}

View file

@ -58,7 +58,7 @@
services.syncthing.spec = {
type = "LoadBalancer";
loadBalancerIP = myLib.globals.syncthingWebIPv4;
loadBalancerIP = myLib.globals.syncthingIPv4;
selector.app = "syncthing";
ports.web = {

View file

@ -8,9 +8,9 @@
bittorrentIPv4 = "192.168.30.133";
gitIPv4 = "192.168.30.132";
piholeIPv4 = "192.168.30.131";
inbucketEmailIPv4 = "192.168.30.130";
inbucketIPv4 = "192.168.30.130";
kmsIPv4 = "192.168.30.129";
traefikIPv4 = "192.168.30.128";
inbucketWebIPv4 = "192.168.30.137";
syncthingWebIPv4 = "192.168.30.138";
syncthingIPv4 = "192.168.30.138";
longhornIPv4 = "192.168.30.139";
}