feat(terraform): GPU worker node support (schematic, interface/diskSelector/swap tuning, gpu-node label, NVIDIA LTS extensions)

This commit is contained in:
Story Crater Bot
2026-08-18 15:08:04 -07:00
parent efb9389093
commit cdf1cdeb18
9 changed files with 246 additions and 3 deletions
+37
View File
@@ -19,13 +19,50 @@ data "talos_image_factory_urls" "longhorn_installer" {
platform = "metal"
}
# GPU-enabled schematic with NVIDIA drivers and toolkit (+ Longhorn deps, since
# worker nodes also run the Longhorn CSI DaemonSet).
# LTS channel (580.xx), not production (595.xx) -- Tesla V100 (Volta) is on
# NVIDIA's Legacy driver branch; the 595.xx production driver ignores it entirely
# ("NVRM: No NVIDIA GPU found").
resource "talos_image_factory_schematic" "gpu_enabled" {
schematic = jsonencode({
customization = {
systemExtensions = {
officialExtensions = [
"siderolabs/iscsi-tools",
"siderolabs/util-linux-tools",
"siderolabs/nonfree-kmod-nvidia-lts",
"siderolabs/nvidia-container-toolkit-lts",
]
}
}
})
}
# Generate installer image URL for GPU schematic
data "talos_image_factory_urls" "gpu_installer" {
talos_version = var.talos_version
schematic_id = talos_image_factory_schematic.gpu_enabled.id
platform = "metal"
}
# Output the schematic ID and installer URL for reference
output "talos_schematic_id" {
value = talos_image_factory_schematic.longhorn.id
description = "Talos Image Factory schematic ID with Longhorn dependencies"
}
output "talos_gpu_schematic_id" {
value = talos_image_factory_schematic.gpu_enabled.id
description = "Talos Image Factory schematic ID with GPU (NVIDIA driver + container toolkit)"
}
output "talos_installer_url" {
value = data.talos_image_factory_urls.longhorn_installer.urls.installer
description = "Talos installer image URL with iscsi-tools and util-linux-tools"
}
output "talos_gpu_installer_url" {
value = data.talos_image_factory_urls.gpu_installer.urls.installer
description = "Talos installer image URL with NVIDIA GPU drivers and container toolkit"
}