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

View file

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

View file

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