71 lines
1.5 KiB
Nix
71 lines
1.5 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;
|
|
};
|
|
|
|
volumeMounts = [{
|
|
name = "storage";
|
|
mountPath = "/storage";
|
|
}];
|
|
};
|
|
|
|
volumes.storage.persistentVolumeClaim.claimName = "inbucket";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
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";
|
|
}];
|
|
};
|
|
};
|
|
|
|
persistentVolumeClaims.inbucket.spec = {
|
|
accessModes = [ "ReadWriteOnce" ];
|
|
storageClassName = "longhorn";
|
|
resources.requests.storage = "30Mi";
|
|
};
|
|
};
|
|
|
|
lab.ingresses.inbucket = {
|
|
host = "inbucket.kun.is";
|
|
entrypoint = "localsecure";
|
|
|
|
service = {
|
|
name = "inbucket-web";
|
|
portName = "web";
|
|
};
|
|
};
|
|
}
|