2026-07-17 23:42:55 -07:00
|
|
|
variable "talos_version" {
|
|
|
|
|
type = string
|
|
|
|
|
default = "v1.13.3"
|
|
|
|
|
description = "Talos version"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "kubernetes_version" {
|
|
|
|
|
type = string
|
|
|
|
|
default = "v1.36.1"
|
|
|
|
|
description = "Kubernetes version"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "cluster_name" {
|
|
|
|
|
type = string
|
|
|
|
|
default = "homelab-cluster"
|
|
|
|
|
description = "Cluster name"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "cluster_id" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Globally unique cluster ID (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "cluster_secret" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Shared cluster secret (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "bootstrap_token" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Bootstrap token for joining cluster"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "machine_token" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Machine PKI token"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "machine_ca_crt" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Machine CA certificate (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "machine_ca_key" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Machine CA private key (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "kubernetes_ca_crt" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Kubernetes CA certificate (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "kubernetes_ca_key" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Kubernetes CA private key (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "etcd_ca_crt" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Etcd CA certificate (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "etcd_ca_key" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Etcd CA private key (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "aggregator_ca_crt" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Aggregator CA certificate (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "aggregator_ca_key" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Aggregator CA private key (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "service_account_key" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Service account private key (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "secretbox_encryption_secret" {
|
|
|
|
|
type = string
|
|
|
|
|
sensitive = true
|
|
|
|
|
description = "Secretbox encryption secret (base64 encoded)"
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-20 08:22:53 -07:00
|
|
|
variable "controlplane_configs" {
|
|
|
|
|
type = map(object({
|
2026-07-25 07:09:45 -07:00
|
|
|
hostname = string
|
|
|
|
|
lan_ip = string
|
|
|
|
|
lan_subnet = string
|
|
|
|
|
lan_gateway = string
|
2026-07-20 08:22:53 -07:00
|
|
|
install_disk = string
|
2026-08-18 14:23:55 -07:00
|
|
|
# Longhorn data disks, in mountpoint order. `device` should be a stable
|
|
|
|
|
# /dev/disk/by-id/wwn-* path: this hardware enumerates /dev/sdX by discovery
|
|
|
|
|
# order, and `install.wipe: true` means a renumber can aim the installer at a
|
|
|
|
|
# data disk.
|
|
|
|
|
#
|
|
|
|
|
# `mountpoint` defaults to /var/lib/longhorn-disk<N> by position. Never
|
|
|
|
|
# renumber or reorder existing entries — Longhorn keys its disks off the
|
|
|
|
|
# mountpoint, so a rename orphans the replicas already on that disk. Append
|
|
|
|
|
# new disks to the end.
|
|
|
|
|
#
|
|
|
|
|
# `kind` ("ssd"/"hdd") is a declared label only. PERC RAID controllers report
|
|
|
|
|
# every disk as rotational, so it can't be autodetected, and it deliberately
|
|
|
|
|
# does not affect ordering or mountpoints.
|
|
|
|
|
longhorn_disks = optional(list(object({
|
2026-07-17 23:42:55 -07:00
|
|
|
device = string
|
2026-08-18 14:23:55 -07:00
|
|
|
mountpoint = optional(string)
|
|
|
|
|
kind = optional(string, "hdd")
|
|
|
|
|
})), [])
|
2026-07-20 08:22:53 -07:00
|
|
|
zone = string
|
|
|
|
|
allow_scheduling = bool
|
2026-07-21 08:02:24 -07:00
|
|
|
# Extra cert SANs for this node — e.g. Cloudflare Tunnel public hostnames so
|
|
|
|
|
# remote talosctl/kubectl over the tunnel pass TLS verification.
|
|
|
|
|
cloudflare_talos_sans = optional(list(string), [])
|
|
|
|
|
cloudflare_apiserver_sans = optional(list(string), [])
|
2026-07-17 23:42:55 -07:00
|
|
|
}))
|
2026-07-20 08:22:53 -07:00
|
|
|
description = "Control plane machine configurations, keyed by node"
|
2026-07-17 23:42:55 -07:00
|
|
|
}
|
|
|
|
|
|
2026-08-10 19:44:18 -07:00
|
|
|
variable "worker_configs" {
|
|
|
|
|
type = map(object({
|
2026-08-13 07:10:03 -07:00
|
|
|
hostname = string
|
|
|
|
|
lan_ip = string
|
|
|
|
|
lan_subnet = string
|
|
|
|
|
lan_gateway = string
|
|
|
|
|
install_disk = string
|
|
|
|
|
network_interface = optional(string, "eno1")
|
|
|
|
|
zone = string
|
|
|
|
|
gpu_count = optional(number, 0)
|
|
|
|
|
# Extra node labels beyond the topology/GPU defaults.
|
|
|
|
|
node_labels = optional(map(string), {})
|
|
|
|
|
# Taints make a node dedicated: only pods carrying a matching toleration
|
|
|
|
|
# schedule there. effect is NoSchedule | PreferNoSchedule | NoExecute.
|
|
|
|
|
node_taints = optional(list(object({
|
|
|
|
|
key = string
|
|
|
|
|
value = string
|
|
|
|
|
effect = string
|
|
|
|
|
})), [])
|
2026-08-10 22:22:20 -07:00
|
|
|
factory_image = optional(string)
|
|
|
|
|
swap_size = optional(string, "")
|
|
|
|
|
ephemeral_max_size = optional(string, "700GiB")
|
2026-08-10 19:44:18 -07:00
|
|
|
extra_disks = optional(list(object({
|
|
|
|
|
device = string
|
|
|
|
|
mountpoint = string
|
|
|
|
|
})), [])
|
|
|
|
|
}))
|
|
|
|
|
default = {}
|
|
|
|
|
description = "Worker machine configurations, keyed by node"
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-17 23:42:55 -07:00
|
|
|
variable "cluster_config" {
|
|
|
|
|
type = object({
|
|
|
|
|
controlplane_ip = string
|
|
|
|
|
pod_subnets = list(string)
|
|
|
|
|
service_subnets = list(string)
|
|
|
|
|
dns_servers = list(string)
|
|
|
|
|
dns_domain = string
|
|
|
|
|
})
|
|
|
|
|
description = "Cluster-wide configuration"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "forgejo_registry_ip" {
|
|
|
|
|
type = string
|
|
|
|
|
default = "10.107.155.96"
|
|
|
|
|
description = "Forgejo registry (container repo) ClusterIP for host DNS rewrite"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "forgejo_hostname" {
|
|
|
|
|
type = string
|
2026-07-19 09:29:17 -07:00
|
|
|
default = "forgejo.riotpiao.com"
|
2026-07-17 23:42:55 -07:00
|
|
|
description = "Forgejo external hostname"
|
|
|
|
|
}
|