nixos-servers/kubenix-modules/inbucket.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, myLib, ... }: {
kubernetes.resources = {
deployments.inbucket = {
metadata.labels.app = "inbucket";
spec = {
selector.matchLabels.app = "inbucket";
template = {
metadata.labels.app = "inbucket";
spec = {
containers.inbucket = {
image = "inbucket/inbucket:edge";
2024-04-14 19:43:31 +00:00
ports = {
web.containerPort = 9000;
smtp.containerPort = 2500;
};
};
};
};
};
};
services = {
inbucket-web.spec = {
selector.app = "inbucket";
2024-04-14 19:43:31 +00:00
ports.web = {
port = 80;
2024-04-14 19:43:31 +00:00
targetPort = "web";
};
};
inbucket-email.spec = {
type = "LoadBalancer";
loadBalancerIP = myLib.globals.inbucketIPv4;
selector.app = "inbucket";
ports = [{
port = 25;
2024-04-14 19:43:31 +00:00
targetPort = "smtp";
}];
};
};
};
lab.ingresses.inbucket = {
host = "inbucket.kun.is";
entrypoint = "localsecure";
service = {
name = "inbucket-web";
portName = "web";
};
};
}