feat: Expose Pihole on tailnet

This commit is contained in:
Pim Kunis 2024-07-21 20:02:40 +02:00
parent 1ee68fc2a6
commit e129d5cf8d
3 changed files with 21 additions and 25 deletions

View file

@ -57,40 +57,28 @@
}; };
services = { services = {
pihole-web.spec = { pihole.spec = {
selector.app = "pihole";
ports.web = {
port = 80;
targetPort = "web";
};
};
pihole-dns.spec = {
type = "LoadBalancer"; type = "LoadBalancer";
loadBalancerIP = myLib.globals.piholeIPv4; loadBalancerIP = myLib.globals.piholeIPv4;
selector.app = "pihole"; selector.app = "pihole";
ports.dns = { ports = {
dns = {
protocol = "UDP"; protocol = "UDP";
port = 53; port = 53;
targetPort = "dns"; targetPort = "dns";
}; };
web = {
port = 80;
targetPort = "web";
};
};
}; };
}; };
}; };
lab = { lab = {
ingresses.pihole = {
host = "pihole.kun.is";
entrypoint = "localsecure";
service = {
name = "pihole-web";
portName = "web";
};
};
longhorn.persistentVolumeClaim = { longhorn.persistentVolumeClaim = {
pihole-data = { pihole-data = {
volumeName = "pihole-data"; volumeName = "pihole-data";
@ -102,5 +90,10 @@
storage = "16Mi"; storage = "16Mi";
}; };
}; };
tailscaleIngresses.tailscale-pihole = {
host = "pihole";
service.name = "pihole";
};
}; };
} }

View file

@ -1,4 +1,4 @@
{ { myLib, ... }: {
kubernetes.resources = { kubernetes.resources = {
serviceAccounts.syncthing = { }; serviceAccounts.syncthing = { };
@ -57,6 +57,8 @@
}; };
services.syncthing.spec = { services.syncthing.spec = {
type = "LoadBalancer";
loadBalancerIP = myLib.globals.syncthingWebIPv4;
selector.app = "syncthing"; selector.app = "syncthing";
ports.web = { ports.web = {

View file

@ -12,4 +12,5 @@
kmsIPv4 = "192.168.30.129"; kmsIPv4 = "192.168.30.129";
traefikIPv4 = "192.168.30.128"; traefikIPv4 = "192.168.30.128";
inbucketWebIPv4 = "192.168.30.137"; inbucketWebIPv4 = "192.168.30.137";
syncthingWebIPv4 = "192.168.30.138";
} }