feat(blog): Move to static-websites k8s namespace

refactor(cyberchef): Move to static-websites k8s namespace
This commit is contained in:
Pim Kunis 2024-07-14 15:31:58 +02:00
parent 3fcbbfa8c2
commit 0d2b2b90f7
8 changed files with 26 additions and 25 deletions

View file

@ -57,6 +57,7 @@ Currently, the applications being deployed like this are:
- `radicale` - `radicale`
- `kms` - `kms`
- `atuin` - `atuin`
- `blog`
## Known bugs ## Known bugs

View file

@ -38,7 +38,7 @@
mkDeployScriptAndManifest = module: applyset: namespace: mkDeployScriptAndManifest = module: applyset: namespace:
let let
kubernetes = (kubenix.evalModules.${system} { kubernetes = (kubenix.evalModules.${system} {
specialArgs = { inherit namespace myLib; }; specialArgs = { inherit namespace myLib blog-pim; };
module = { kubenix, ... }: module = { kubenix, ... }:
{ {
@ -65,7 +65,7 @@
kubenix.bootstrap.deploy = mkKubenixPackage "${self}/kubenix-modules/base.nix"; kubenix.bootstrap.deploy = mkKubenixPackage "${self}/kubenix-modules/base.nix";
kubenix.cyberchef = mkDeployScriptAndManifest kubenix.cyberchef = mkDeployScriptAndManifest
"${self}/kubenix-modules/cyberchef.nix" "cyberchef" "cyberchef"; "${self}/kubenix-modules/cyberchef.nix" "cyberchef" "static-websites";
kubenix.freshrss = mkDeployScriptAndManifest kubenix.freshrss = mkDeployScriptAndManifest
"${self}/kubenix-modules/freshrss.nix" "freshrss" "freshrss"; "${self}/kubenix-modules/freshrss.nix" "freshrss" "freshrss";
kubenix.radicale = mkDeployScriptAndManifest kubenix.radicale = mkDeployScriptAndManifest
@ -74,4 +74,6 @@
"${self}/kubenix-modules/kms.nix" "kms" "kms"; "${self}/kubenix-modules/kms.nix" "kms" "kms";
kubenix.atuin = mkDeployScriptAndManifest kubenix.atuin = mkDeployScriptAndManifest
"${self}/kubenix-modules/atuin.nix" "atuin" "atuin"; "${self}/kubenix-modules/atuin.nix" "atuin" "atuin";
kubenix.blog = mkDeployScriptAndManifest
"${self}/kubenix-modules/blog.nix" "blog" "static-websites";
}) })

View file

@ -9,15 +9,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716491160, "lastModified": 1715503080,
"narHash": "sha256-dA6+BRp3ptxdgsysrVE5i+asQA8Yk5TTLnr+8hPNzrg=", "narHash": "sha256-/VnzHTpTq3u0z2Vgu/vKU0SHwOUIu8olHDORWT0IofM=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "e82fb4539d51da22b6a01e50416ef6ecb548c681", "rev": "7296f7f5bf5f089a5137036dcbd8058cf3e4a9e5",
"revCount": 22, "revCount": 21,
"type": "git", "type": "git",
"url": "https://git.kun.is/home/blog-pim" "url": "https://git.kun.is/home/blog-pim"
}, },
"original": { "original": {
"rev": "7296f7f5bf5f089a5137036dcbd8058cf3e4a9e5",
"type": "git", "type": "git",
"url": "https://git.kun.is/home/blog-pim" "url": "https://git.kun.is/home/blog-pim"
} }

View file

@ -24,7 +24,8 @@
}; };
blog-pim = { blog-pim = {
url = "git+https://git.kun.is/home/blog-pim"; # HACK: pinning this to a specific revision, as my automation is broken.
url = "git+https://git.kun.is/home/blog-pim?rev=7296f7f5bf5f089a5137036dcbd8058cf3e4a9e5";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };

View file

@ -11,7 +11,6 @@ let
./media.nix ./media.nix
./bind9 ./bind9
./dnsmasq.nix ./dnsmasq.nix
./blog.nix
./attic.nix ./attic.nix
./immich.nix ./immich.nix
# ./argo.nix # ./argo.nix

View file

@ -61,7 +61,7 @@
resources = { resources = {
namespaces = { namespaces = {
cyberchef = { }; static-websites = { };
freshrss = { }; freshrss = { };
radicale = { }; radicale = { };
kms = { }; kms = { };

View file

@ -1,19 +1,16 @@
{ blog-pim, ... }: { { blog-pim, ... }: {
kubernetes.resources = { kubernetes.resources = {
deployments.blog = { deployments.blog.spec = {
metadata.labels.app = "blog"; replicas = 3;
selector.matchLabels.app = "blog";
spec = { template = {
selector.matchLabels.app = "blog"; metadata.labels.app = "blog";
template = { spec = {
metadata.labels.app = "blog"; containers.blog = {
image = "git.kun.is/home/blog-pim:${blog-pim.rev}";
spec = { ports.web.containerPort = 80;
containers.blog = {
image = "git.kun.is/home/blog-pim:${blog-pim.rev}";
ports.web.containerPort = 80;
};
}; };
}; };
}; };

View file

@ -1,6 +1,6 @@
{ {
kubernetes.resources = { kubernetes.resources = {
deployments.server.spec = { deployments.cyberchef.spec = {
replicas = 3; replicas = 3;
selector.matchLabels.app = "cyberchef"; selector.matchLabels.app = "cyberchef";
@ -14,7 +14,7 @@
}; };
}; };
services.server.spec = { services.cyberchef.spec = {
selector.app = "cyberchef"; selector.app = "cyberchef";
ports.web = { ports.web = {
@ -24,11 +24,11 @@
}; };
}; };
lab.ingresses.server = { lab.ingresses.cyberchef = {
host = "cyberchef.kun.is"; host = "cyberchef.kun.is";
service = { service = {
name = "server"; name = "cyberchef";
portName = "web"; portName = "web";
}; };
}; };