feat: refactor infra to cp/wk kubeadm topology
Some checks failed
Terraform Plan / Terraform Plan (push) Failing after 9s

Provision 3 thin control planes and 3 workers with role-specific sizing and VMID ranges (701/711), generate per-node cloud-init snippets with SSH key injection, and add NixOS kubeadm host/module scaffolding for cp-1..3 and wk-1..3.
This commit is contained in:
2026-02-28 14:16:55 +00:00
parent c516c8ba35
commit 21be01346b
19 changed files with 348 additions and 62 deletions

View File

@@ -0,0 +1,14 @@
{ lib, ... }:
{
imports =
[
../modules/k8s-common.nix
../modules/k8s-control-plane.nix
]
++ lib.optional (builtins.pathExists ./hardware/cp-1.nix) ./hardware/cp-1.nix;
networking.hostName = "cp-1";
system.stateVersion = "25.05";
}

View File

@@ -0,0 +1,14 @@
{ lib, ... }:
{
imports =
[
../modules/k8s-common.nix
../modules/k8s-control-plane.nix
]
++ lib.optional (builtins.pathExists ./hardware/cp-2.nix) ./hardware/cp-2.nix;
networking.hostName = "cp-2";
system.stateVersion = "25.05";
}

View File

@@ -0,0 +1,14 @@
{ lib, ... }:
{
imports =
[
../modules/k8s-common.nix
../modules/k8s-control-plane.nix
]
++ lib.optional (builtins.pathExists ./hardware/cp-3.nix) ./hardware/cp-3.nix;
networking.hostName = "cp-3";
system.stateVersion = "25.05";
}

View File

View File

@@ -0,0 +1,14 @@
{ lib, ... }:
{
imports =
[
../modules/k8s-common.nix
../modules/k8s-worker.nix
]
++ lib.optional (builtins.pathExists ./hardware/wk-1.nix) ./hardware/wk-1.nix;
networking.hostName = "wk-1";
system.stateVersion = "25.05";
}

View File

@@ -0,0 +1,14 @@
{ lib, ... }:
{
imports =
[
../modules/k8s-common.nix
../modules/k8s-worker.nix
]
++ lib.optional (builtins.pathExists ./hardware/wk-2.nix) ./hardware/wk-2.nix;
networking.hostName = "wk-2";
system.stateVersion = "25.05";
}

View File

@@ -0,0 +1,14 @@
{ lib, ... }:
{
imports =
[
../modules/k8s-common.nix
../modules/k8s-worker.nix
]
++ lib.optional (builtins.pathExists ./hardware/wk-3.nix) ./hardware/wk-3.nix;
networking.hostName = "wk-3";
system.stateVersion = "25.05";
}