diff --git a/kubenix-modules/all.nix b/kubenix-modules/all.nix index 1d79b28..d836c1d 100644 --- a/kubenix-modules/all.nix +++ b/kubenix-modules/all.nix @@ -24,5 +24,6 @@ ./custom/ingress.nix ./custom/nfs-volume.nix ./traefik.nix + ./blog.nix ]; } diff --git a/kubenix-modules/blog.nix b/kubenix-modules/blog.nix new file mode 100644 index 0000000..1a83a4b --- /dev/null +++ b/kubenix-modules/blog.nix @@ -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"; + }; + }; +}