diff --git a/kubenix-modules/pihole.nix b/kubenix-modules/pihole.nix index b5540b9..a465d7e 100644 --- a/kubenix-modules/pihole.nix +++ b/kubenix-modules/pihole.nix @@ -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"; + }; }; } diff --git a/kubenix-modules/syncthing.nix b/kubenix-modules/syncthing.nix index de132c0..afae1ed 100644 --- a/kubenix-modules/syncthing.nix +++ b/kubenix-modules/syncthing.nix @@ -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 = { diff --git a/my-lib/globals.nix b/my-lib/globals.nix index 049c883..3df3b46 100644 --- a/my-lib/globals.nix +++ b/my-lib/globals.nix @@ -12,4 +12,5 @@ kmsIPv4 = "192.168.30.129"; traefikIPv4 = "192.168.30.128"; inbucketWebIPv4 = "192.168.30.137"; + syncthingWebIPv4 = "192.168.30.138"; }