Init
This commit is contained in:
commit
cdec5a64aa
44 changed files with 9802 additions and 0 deletions
41
modules/blog.nix
Normal file
41
modules/blog.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ blog-pim, lib, config, ... }: {
|
||||
options.blog.enable = lib.mkEnableOption "blog";
|
||||
|
||||
config = lib.mkIf config.blog.enable {
|
||||
kubernetes.resources = {
|
||||
deployments.blog.spec = {
|
||||
replicas = 3;
|
||||
selector.matchLabels.app = "blog";
|
||||
|
||||
template = {
|
||||
metadata.labels.app = "blog";
|
||||
|
||||
spec = {
|
||||
containers.blog = {
|
||||
image = "git.kun.is/home/blog-pim:${blog-pim.rev}";
|
||||
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…
Add table
Add a link
Reference in a new issue