add k8s deployment for blog
This commit is contained in:
parent
44013d3a78
commit
d833b055ee
2 changed files with 41 additions and 0 deletions
|
@ -24,5 +24,6 @@
|
|||
./custom/ingress.nix
|
||||
./custom/nfs-volume.nix
|
||||
./traefik.nix
|
||||
./blog.nix
|
||||
];
|
||||
}
|
||||
|
|
40
kubenix-modules/blog.nix
Normal file
40
kubenix-modules/blog.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
kubernetes.resources = {
|
||||
deployments.blog = {
|
||||
metadata.labels.app = "blog";
|
||||
|
||||
spec = {
|
||||
selector.matchLabels.app = "blog";
|
||||
|
||||
template = {
|
||||
metadata.labels.app = "blog";
|
||||
|
||||
spec = {
|
||||
containers.blog = {
|
||||
image = "git.kun.is/pim/static:test3";
|
||||
ports.web.containerPort = 80;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.blog.spec = {
|
||||
selector.app = "blog";
|
||||
|
||||
ports.web = {
|
||||
port = 80;
|
||||
targetPort = "web";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lab.ingresses.blog = {
|
||||
host = "pim.kun.is";
|
||||
|
||||
service = {
|
||||
name = "blog";
|
||||
portName = "web";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue