diff --git a/hosts/12kingdoms-shushou/microvm.nix b/hosts/12kingdoms-shushou/microvm.nix index 006e515d..c6f173f5 100644 --- a/hosts/12kingdoms-shushou/microvm.nix +++ b/hosts/12kingdoms-shushou/microvm.nix @@ -24,20 +24,6 @@ config.imports = [ ../k8s/k3s-test-1-master-3 ]; }; - microvm.vms.k3s-test-1-worker-2 = { - autostart = true; - restartIfChanged = true; - specialArgs = { - inherit - myvars - mylib - agenix - mysecrets - ; - }; - config.imports = [ ../k8s/k3s-test-1-worker-2 ]; - }; - microvm.vms.k3s-test-1-worker-3 = { autostart = true; restartIfChanged = true; @@ -54,8 +40,7 @@ # Attach the guest's tap to the VM bridge, the same way the physical NIC is # attached. The tap name is derived from the guest IP (192.168.5.116 -> vm116, - # 192.168.5.112 -> vm112, 192.168.5.113 -> vm113), as IFNAMSIZ caps interface - # names at 15 characters. + # 192.168.5.113 -> vm113), as IFNAMSIZ caps interface names at 15 characters. systemd.network.networks."20-vm116" = { matchConfig.Name = [ "vm116" ]; networkConfig = { @@ -64,14 +49,6 @@ }; linkConfig.RequiredForOnline = "no"; }; - systemd.network.networks."20-vm112" = { - matchConfig.Name = [ "vm112" ]; - networkConfig = { - LinkLocalAddressing = "no"; - Bridge = "br0"; - }; - linkConfig.RequiredForOnline = "no"; - }; systemd.network.networks."20-vm113" = { matchConfig.Name = [ "vm113" ]; networkConfig = { diff --git a/hosts/12kingdoms-youko/microvm.nix b/hosts/12kingdoms-youko/microvm.nix index 9a94af6a..c4088bd3 100644 --- a/hosts/12kingdoms-youko/microvm.nix +++ b/hosts/12kingdoms-youko/microvm.nix @@ -24,8 +24,25 @@ config.imports = [ ../k8s/k3s-test-1-master-2 ]; }; + # Moved here from shushou after the SSD swap: the 5625U there is weaker and has + # only 22 GiB, too little for this 16 GiB worker. + microvm.vms.k3s-test-1-worker-2 = { + autostart = true; + restartIfChanged = true; + specialArgs = { + inherit + myvars + mylib + agenix + mysecrets + ; + }; + config.imports = [ ../k8s/k3s-test-1-worker-2 ]; + }; + # Attach the guest's tap to the VM bridge, the same way the physical NIC is - # attached. The tap name is derived from the guest IP (192.168.5.115 -> vm115). + # attached. The tap name is derived from the guest IP (192.168.5.115 -> vm115, + # 192.168.5.112 -> vm112), as IFNAMSIZ caps interface names at 15 characters. systemd.network.networks."20-vm115" = { matchConfig.Name = [ "vm115" ]; networkConfig = { @@ -34,4 +51,12 @@ }; linkConfig.RequiredForOnline = "no"; }; + systemd.network.networks."20-vm112" = { + matchConfig.Name = [ "vm112" ]; + networkConfig = { + LinkLocalAddressing = "no"; + Bridge = "br0"; + }; + linkConfig.RequiredForOnline = "no"; + }; } diff --git a/hosts/README.md b/hosts/README.md index 49f59183..6046c29a 100644 --- a/hosts/README.md +++ b/hosts/README.md @@ -54,8 +54,9 @@ disks. #### `k8s` - Kubernetes Infrastructure - **VM Cluster**: 3 physical mini PCs (shoryu, shushou, youko) running all VMs -- **K3s Testing**: `k3s-test-1-master-{1,2,3}` (control plane) + `k3s-test-1-worker-{1,2,3}` - (workloads; two on `shushou`, one on `shoryu`), running as microVMs +- **K3s Testing**: `k3s-test-1-master-{1,2,3}` (control plane; one per host) + + `k3s-test-1-worker-{1,2,3}` (workloads; `worker-1` on `shoryu`, `worker-2` on `youko`, `worker-3` + on `shushou`), running as microVMs ### External Systems diff --git a/hosts/k8s/k3s-test-1-master-3/default.nix b/hosts/k8s/k3s-test-1-master-3/default.nix index 4b6d3642..5446d4ec 100644 --- a/hosts/k8s/k3s-test-1-master-3/default.nix +++ b/hosts/k8s/k3s-test-1-master-3/default.nix @@ -13,7 +13,7 @@ let inherit pkgs hostName; inherit (myvars) networking; vcpu = 2; - mem = 8192; + mem = 4096; varSize = 20480; }; k3sModule = mylib.genK3sServerModule {