feat(inbucket): Move to separate k8s namespace

This commit is contained in:
Pim Kunis 2024-07-16 19:56:18 +02:00
parent af9f72b76a
commit e9307da90d
5 changed files with 18 additions and 19 deletions

View file

@ -67,6 +67,7 @@ Currently, the applications being deployed like this are:
- `pihole` - `pihole`
- `immich` - `immich`
- `attic` - `attic`
- `inbucket`
## Known bugs ## Known bugs

View file

@ -94,4 +94,6 @@
"${self}/kubenix-modules/immich.nix" "immich" "immich"; "${self}/kubenix-modules/immich.nix" "immich" "immich";
kubenix.attic = mkDeployScriptAndManifest kubenix.attic = mkDeployScriptAndManifest
"${self}/kubenix-modules/attic.nix" "attic" "attic"; "${self}/kubenix-modules/attic.nix" "attic" "attic";
kubenix.inbucket = mkDeployScriptAndManifest
"${self}/kubenix-modules/inbucket.nix" "inbucket" "inbucket";
}) })

View file

@ -1,6 +1,5 @@
let let
applications = [ applications = [
./inbucket.nix
./media.nix ./media.nix
./bind9 ./bind9
./dnsmasq.nix ./dnsmasq.nix

View file

@ -75,6 +75,7 @@
pihole = { }; pihole = { };
immich = { }; immich = { };
attic = { }; attic = { };
inbucket = { };
}; };
nodes = nodes =

View file

@ -1,22 +1,18 @@
{ lib, myLib, ... }: { { myLib, ... }: {
kubernetes.resources = { kubernetes.resources = {
deployments.inbucket = { deployments.inbucket.spec = {
metadata.labels.app = "inbucket"; selector.matchLabels.app = "inbucket";
spec = { template = {
selector.matchLabels.app = "inbucket"; metadata.labels.app = "inbucket";
template = { spec = {
metadata.labels.app = "inbucket"; containers.inbucket = {
image = "inbucket/inbucket:edge";
spec = { ports = {
containers.inbucket = { web.containerPort = 9000;
image = "inbucket/inbucket:edge"; smtp.containerPort = 2500;
ports = {
web.containerPort = 9000;
smtp.containerPort = 2500;
};
}; };
}; };
}; };
@ -24,7 +20,7 @@
}; };
services = { services = {
inbucket-web.spec = { web.spec = {
selector.app = "inbucket"; selector.app = "inbucket";
ports.web = { ports.web = {
@ -33,7 +29,7 @@
}; };
}; };
inbucket-email.spec = { email.spec = {
type = "LoadBalancer"; type = "LoadBalancer";
loadBalancerIP = myLib.globals.inbucketIPv4; loadBalancerIP = myLib.globals.inbucketIPv4;
selector.app = "inbucket"; selector.app = "inbucket";
@ -51,7 +47,7 @@
entrypoint = "localsecure"; entrypoint = "localsecure";
service = { service = {
name = "inbucket-web"; name = "web";
portName = "web"; portName = "web";
}; };
}; };