nixos-servers/kubenix-modules/blog.nix

38 lines
664 B
Nix
Raw Normal View History

{ blog-pim, ... }: {
2024-04-22 21:46:59 +00:00
kubernetes.resources = {
deployments.blog.spec = {
replicas = 3;
selector.matchLabels.app = "blog";
2024-04-22 21:46:59 +00:00
template = {
metadata.labels.app = "blog";
2024-04-22 21:46:59 +00:00
spec = {
containers.blog = {
image = "git.kun.is/home/blog-pim:${blog-pim.rev}";
ports.web.containerPort = 80;
2024-04-22 21:46:59 +00:00
};
};
};
};
services.blog.spec = {
selector.app = "blog";
ports.web = {
port = 80;
targetPort = "web";
};
};
};
lab.ingresses.blog = {
host = "pim.kun.is";
service = {
name = "blog";
portName = "web";
};
};
}