2024-07-21 14:26:21 +00:00
|
|
|
{ myLib, ... }: {
|
2024-03-28 19:27:36 +00:00
|
|
|
kubernetes.resources = {
|
2024-07-21 14:26:21 +00:00
|
|
|
serviceAccounts.inbucket = { };
|
2024-07-21 13:05:27 +00:00
|
|
|
|
2024-07-16 17:56:18 +00:00
|
|
|
deployments.inbucket.spec = {
|
|
|
|
selector.matchLabels.app = "inbucket";
|
2024-03-28 19:27:36 +00:00
|
|
|
|
2024-07-16 17:56:18 +00:00
|
|
|
template = {
|
|
|
|
metadata.labels.app = "inbucket";
|
2024-03-28 19:27:36 +00:00
|
|
|
|
2024-07-16 17:56:18 +00:00
|
|
|
spec = {
|
2024-07-21 14:26:21 +00:00
|
|
|
serviceAccountName = "inbucket";
|
2024-07-21 13:05:27 +00:00
|
|
|
|
|
|
|
containers = {
|
|
|
|
inbucket = {
|
|
|
|
image = "inbucket/inbucket:edge";
|
|
|
|
|
|
|
|
env.INBUCKET_WEB_ADDR.value = "0.0.0.0:80";
|
2024-03-28 19:27:36 +00:00
|
|
|
|
2024-07-21 13:05:27 +00:00
|
|
|
ports = {
|
|
|
|
web.containerPort = 80;
|
|
|
|
smtp.containerPort = 2500;
|
|
|
|
};
|
|
|
|
};
|
2024-03-28 19:27:36 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
2024-07-16 17:56:18 +00:00
|
|
|
web.spec = {
|
2024-07-21 13:05:27 +00:00
|
|
|
type = "LoadBalancer";
|
|
|
|
loadBalancerIP = myLib.globals.inbucketWebIPv4;
|
2024-03-28 19:27:36 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-07-16 17:56:18 +00:00
|
|
|
email.spec = {
|
2024-03-28 19:27:36 +00:00
|
|
|
type = "LoadBalancer";
|
2024-07-21 13:05:27 +00:00
|
|
|
loadBalancerIP = myLib.globals.inbucketEmailIPv4;
|
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-07-21 14:26:21 +00:00
|
|
|
|
|
|
|
lab.tailscale = {
|
|
|
|
enable = true;
|
|
|
|
allowedServiceAccounts = [ "inbucket" ];
|
|
|
|
deploymentsWithSidecarContainers.inbucket.hostName = "inbucket";
|
|
|
|
};
|
2024-03-28 19:27:36 +00:00
|
|
|
}
|