nixos-servers/kubenix-modules/inbucket.nix

67 lines
1.2 KiB
Nix
Raw Normal View History

{ myLib, ... }: {
kubernetes.resources = {
serviceAccounts.inbucket = { };
2024-07-21 13:05:27 +00:00
deployments.inbucket.spec = {
selector.matchLabels.app = "inbucket";
template = {
metadata.labels.app = "inbucket";
spec = {
serviceAccountName = "inbucket";
2024-07-21 13:05:27 +00:00
containers = {
inbucket = {
image = "inbucket/inbucket:edge";
ports = {
2024-07-21 17:47:22 +00:00
web.containerPort = 9000;
2024-07-21 13:05:27 +00:00
smtp.containerPort = 2500;
};
};
};
};
};
};
services = {
inbucket.spec = {
2024-07-21 13:05:27 +00:00
type = "LoadBalancer";
loadBalancerIP = myLib.globals.inbucketIPv4;
selector.app = "inbucket";
ports = {
smtp = {
port = 25;
targetPort = "smtp";
};
web = {
port = 80;
targetPort = "web";
};
};
};
};
};
lab = {
tailscaleIngresses.tailscale = {
host = "inbucket";
service.name = "inbucket";
};
ingresses.inbucket = {
host = "inbucket.kun.is";
entrypoint = "localsecure";
service = {
name = "inbucket";
portName = "web";
};
};
};
}