2024-05-20 15:47:49 +00:00
|
|
|
{ lib, myLib, ... }: {
|
2024-03-28 19:27:36 +00:00
|
|
|
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;
|
|
|
|
};
|
2024-03-28 19:27:36 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
inbucket-web.spec = {
|
|
|
|
selector.app = "inbucket";
|
|
|
|
|
2024-04-14 19:43:31 +00:00
|
|
|
ports.web = {
|
2024-03-28 19:27:36 +00:00
|
|
|
port = 80;
|
2024-04-14 19:43:31 +00:00
|
|
|
targetPort = "web";
|
|
|
|
};
|
2024-03-28 19:27:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
inbucket-email.spec = {
|
|
|
|
type = "LoadBalancer";
|
2024-04-13 21:25:48 +00:00
|
|
|
loadBalancerIP = myLib.globals.inbucketIPv4;
|
2024-03-28 19:27:36 +00:00
|
|
|
selector.app = "inbucket";
|
|
|
|
|
|
|
|
ports = [{
|
|
|
|
port = 25;
|
2024-04-14 19:43:31 +00:00
|
|
|
targetPort = "smtp";
|
2024-03-28 19:27:36 +00:00
|
|
|
}];
|
|
|
|
};
|
|
|
|
};
|
2024-04-14 21:11:19 +00:00
|
|
|
};
|
2024-03-28 19:27:36 +00:00
|
|
|
|
2024-04-14 21:11:19 +00:00
|
|
|
lab.ingresses.inbucket = {
|
|
|
|
host = "inbucket.kun.is";
|
|
|
|
entrypoint = "localsecure";
|
2024-04-08 18:42:06 +00:00
|
|
|
|
2024-04-14 21:11:19 +00:00
|
|
|
service = {
|
|
|
|
name = "inbucket-web";
|
|
|
|
portName = "web";
|
2024-04-08 18:42:06 +00:00
|
|
|
};
|
2024-03-28 19:27:36 +00:00
|
|
|
};
|
|
|
|
}
|