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:
@@ -27,20 +27,74 @@ variable "clone_template" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "cores" {
|
||||
type = number
|
||||
variable "control_plane_count" {
|
||||
type = number
|
||||
default = 3
|
||||
description = "Number of control plane VMs"
|
||||
}
|
||||
|
||||
variable "memory" {
|
||||
type = number
|
||||
variable "worker_count" {
|
||||
type = number
|
||||
default = 3
|
||||
description = "Number of worker VMs"
|
||||
}
|
||||
|
||||
variable "disk_size" {
|
||||
type = string
|
||||
variable "control_plane_vmid_start" {
|
||||
type = number
|
||||
default = 701
|
||||
description = "Starting VMID for control plane VMs"
|
||||
}
|
||||
|
||||
variable "sockets" {
|
||||
type = number
|
||||
variable "worker_vmid_start" {
|
||||
type = number
|
||||
default = 711
|
||||
description = "Starting VMID for worker VMs"
|
||||
}
|
||||
|
||||
variable "control_plane_cores" {
|
||||
type = number
|
||||
default = 1
|
||||
description = "vCPU cores per control plane VM"
|
||||
}
|
||||
|
||||
variable "control_plane_memory_mb" {
|
||||
type = number
|
||||
default = 4096
|
||||
description = "Memory in MB per control plane VM"
|
||||
}
|
||||
|
||||
variable "worker_cores" {
|
||||
type = list(number)
|
||||
default = [4, 4, 3]
|
||||
description = "vCPU cores for each worker VM"
|
||||
|
||||
validation {
|
||||
condition = length(var.worker_cores) == var.worker_count
|
||||
error_message = "worker_cores list length must equal worker_count."
|
||||
}
|
||||
}
|
||||
|
||||
variable "worker_memory_mb" {
|
||||
type = list(number)
|
||||
default = [12288, 12288, 12288]
|
||||
description = "Memory in MB for each worker VM"
|
||||
|
||||
validation {
|
||||
condition = length(var.worker_memory_mb) == var.worker_count
|
||||
error_message = "worker_memory_mb list length must equal worker_count."
|
||||
}
|
||||
}
|
||||
|
||||
variable "control_plane_disk_size" {
|
||||
type = string
|
||||
default = "40G"
|
||||
description = "Disk size for control plane VMs"
|
||||
}
|
||||
|
||||
variable "worker_disk_size" {
|
||||
type = string
|
||||
default = "60G"
|
||||
description = "Disk size for worker VMs"
|
||||
}
|
||||
|
||||
variable "bridge" {
|
||||
@@ -55,18 +109,6 @@ variable "pm_api_url" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "alpaca_vm_count" {
|
||||
type = number
|
||||
default = 1
|
||||
description = "How many Alpaca VMs to create"
|
||||
}
|
||||
|
||||
variable "llama_vm_count" {
|
||||
type = number
|
||||
default = 1
|
||||
description = "How many Llama VMs to create"
|
||||
}
|
||||
|
||||
variable "SSH_KEY_PUBLIC" {
|
||||
type = string
|
||||
description = "Public SSH key injected via cloud-init"
|
||||
|
||||
Reference in New Issue
Block a user