diff --git a/README.md b/README.md index 915f974..bbfccb6 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Currently, the applications being deployed like this are: - `pihole` - `immich` - `attic` +- `inbucket` ## Known bugs diff --git a/flake-parts/kubenix.nix b/flake-parts/kubenix.nix index 2844ede..4a197cc 100644 --- a/flake-parts/kubenix.nix +++ b/flake-parts/kubenix.nix @@ -94,4 +94,6 @@ "${self}/kubenix-modules/immich.nix" "immich" "immich"; kubenix.attic = mkDeployScriptAndManifest "${self}/kubenix-modules/attic.nix" "attic" "attic"; + kubenix.inbucket = mkDeployScriptAndManifest + "${self}/kubenix-modules/inbucket.nix" "inbucket" "inbucket"; }) diff --git a/kubenix-modules/all.nix b/kubenix-modules/all.nix index b07e1a4..fd78044 100644 --- a/kubenix-modules/all.nix +++ b/kubenix-modules/all.nix @@ -1,6 +1,5 @@ let applications = [ - ./inbucket.nix ./media.nix ./bind9 ./dnsmasq.nix diff --git a/kubenix-modules/base.nix b/kubenix-modules/base.nix index b9d05b6..8cf6974 100644 --- a/kubenix-modules/base.nix +++ b/kubenix-modules/base.nix @@ -75,6 +75,7 @@ pihole = { }; immich = { }; attic = { }; + inbucket = { }; }; nodes = diff --git a/kubenix-modules/inbucket.nix b/kubenix-modules/inbucket.nix index ba4edbd..80033f8 100644 --- a/kubenix-modules/inbucket.nix +++ b/kubenix-modules/inbucket.nix @@ -1,22 +1,18 @@ -{ lib, myLib, ... }: { +{ myLib, ... }: { kubernetes.resources = { - deployments.inbucket = { - metadata.labels.app = "inbucket"; + deployments.inbucket.spec = { + selector.matchLabels.app = "inbucket"; - spec = { - selector.matchLabels.app = "inbucket"; + template = { + metadata.labels.app = "inbucket"; - template = { - metadata.labels.app = "inbucket"; + spec = { + containers.inbucket = { + image = "inbucket/inbucket:edge"; - spec = { - containers.inbucket = { - image = "inbucket/inbucket:edge"; - - ports = { - web.containerPort = 9000; - smtp.containerPort = 2500; - }; + ports = { + web.containerPort = 9000; + smtp.containerPort = 2500; }; }; }; @@ -24,7 +20,7 @@ }; services = { - inbucket-web.spec = { + web.spec = { selector.app = "inbucket"; ports.web = { @@ -33,7 +29,7 @@ }; }; - inbucket-email.spec = { + email.spec = { type = "LoadBalancer"; loadBalancerIP = myLib.globals.inbucketIPv4; selector.app = "inbucket"; @@ -51,7 +47,7 @@ entrypoint = "localsecure"; service = { - name = "inbucket-web"; + name = "web"; portName = "web"; }; };