convert inbucket to kubernetes deployment
This commit is contained in:
parent
b4805c028c
commit
41a5ed9dc5
5 changed files with 82 additions and 1 deletions
|
@ -6,7 +6,6 @@
|
|||
- {role: forgejo, tags: forgejo}
|
||||
- {role: radicale, tags: radicale}
|
||||
- {role: hedgedoc, tags: hedgedoc}
|
||||
- {role: inbucket, tags: inbucket}
|
||||
- {role: swarm_dashboard, tags: swarm_dashboard}
|
||||
- {role: pihole, tags: pihole}
|
||||
- {role: nextcloud, tags: nextcloud}
|
||||
|
|
|
@ -66,6 +66,12 @@ services:
|
|||
- traefik.http.routers.freshrss.rule=Host(`rss.kun.is`)
|
||||
- traefik.http.routers.freshrss.tls=true
|
||||
- traefik.http.routers.freshrss.tls.certresolver=letsencrypt
|
||||
|
||||
- traefik.http.routers.inbucket.entrypoints=localsecure
|
||||
- traefik.http.routers.inbucket.service=k3s@file
|
||||
- traefik.http.routers.inbucket.rule=Host(`inbucket.kun.is`)
|
||||
- traefik.http.routers.inbucket.tls=true
|
||||
- traefik.http.routers.inbucket.tls.certresolver=letsencrypt
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /var/run/docker.sock
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
./freshrss.nix
|
||||
./cyberchef.nix
|
||||
./kms.nix
|
||||
./inbucket.nix
|
||||
];
|
||||
kubernetes.kubeconfig = "~/.kube/config";
|
||||
kubenix.project = "home";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
PUBLISHED_PORT = "443";
|
||||
};
|
||||
|
||||
# TODO: encrypt this with sops and commit to git repo.
|
||||
secrets.freshrss.stringData.adminPassword = "ref+file:///home/pim/.config/home/vals.yaml";
|
||||
|
||||
deployments.freshrss = {
|
||||
|
|
74
nix/flake/kubenix/inbucket.nix
Normal file
74
nix/flake/kubenix/inbucket.nix
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
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";
|
||||
|
||||
# TODO: investigate the use of named ports.
|
||||
ports = [
|
||||
{
|
||||
containerPort = 9000;
|
||||
protocol = "TCP";
|
||||
}
|
||||
{
|
||||
containerPort = 2500;
|
||||
protocol = "TCP";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
inbucket-web.spec = {
|
||||
selector.app = "inbucket";
|
||||
|
||||
ports = [{
|
||||
protocol = "TCP";
|
||||
port = 80;
|
||||
targetPort = 9000;
|
||||
}];
|
||||
};
|
||||
|
||||
inbucket-email.spec = {
|
||||
type = "LoadBalancer";
|
||||
loadBalancerIP = "192.168.30.130";
|
||||
selector.app = "inbucket";
|
||||
|
||||
ports = [{
|
||||
port = 25;
|
||||
targetPort = 2500;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
ingresses.inbucket.spec = {
|
||||
ingressClassName = "traefik";
|
||||
|
||||
rules = [{
|
||||
host = "inbucket.kun.is";
|
||||
|
||||
http.paths = [{
|
||||
path = "/";
|
||||
pathType = "Prefix";
|
||||
|
||||
backend.service = {
|
||||
name = "inbucket-web";
|
||||
port.number = 80;
|
||||
};
|
||||
}];
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue