feat: refactor infra to cp/wk kubeadm topology
Some checks failed
Terraform Plan / Terraform Plan (push) Failing after 9s
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:
14
nixos/kubeadm/hosts/cp-1.nix
Normal file
14
nixos/kubeadm/hosts/cp-1.nix
Normal 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";
|
||||
}
|
||||
14
nixos/kubeadm/hosts/cp-2.nix
Normal file
14
nixos/kubeadm/hosts/cp-2.nix
Normal 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";
|
||||
}
|
||||
14
nixos/kubeadm/hosts/cp-3.nix
Normal file
14
nixos/kubeadm/hosts/cp-3.nix
Normal 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";
|
||||
}
|
||||
0
nixos/kubeadm/hosts/hardware/.gitkeep
Normal file
0
nixos/kubeadm/hosts/hardware/.gitkeep
Normal file
14
nixos/kubeadm/hosts/wk-1.nix
Normal file
14
nixos/kubeadm/hosts/wk-1.nix
Normal 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";
|
||||
}
|
||||
14
nixos/kubeadm/hosts/wk-2.nix
Normal file
14
nixos/kubeadm/hosts/wk-2.nix
Normal 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";
|
||||
}
|
||||
14
nixos/kubeadm/hosts/wk-3.nix
Normal file
14
nixos/kubeadm/hosts/wk-3.nix
Normal 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";
|
||||
}
|
||||
Reference in New Issue
Block a user