58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{ 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";
|
|
|
|
ports = {
|
|
web.containerPort = 9000;
|
|
smtp.containerPort = 2500;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
services = {
|
|
inbucket-web.spec = {
|
|
selector.app = "inbucket";
|
|
|
|
ports.web = {
|
|
port = 80;
|
|
targetPort = "web";
|
|
};
|
|
};
|
|
|
|
inbucket-email.spec = {
|
|
type = "LoadBalancer";
|
|
loadBalancerIP = myLib.globals.inbucketIPv4;
|
|
selector.app = "inbucket";
|
|
|
|
ports = [{
|
|
port = 25;
|
|
targetPort = "smtp";
|
|
}];
|
|
};
|
|
};
|
|
};
|
|
|
|
lab.ingresses.inbucket = {
|
|
host = "inbucket.kun.is";
|
|
entrypoint = "localsecure";
|
|
|
|
service = {
|
|
name = "inbucket-web";
|
|
portName = "web";
|
|
};
|
|
};
|
|
}
|