IaC Control Plane #12
Labels
No labels
bug
duplicate
effort
high
effort
low
effort
medium
effort
minimal
enhancement
help wanted
invalid
pr
feedback
pr
reviewing
question
status
backlog
status
document
status
done
status
implement
status
pending
status
planning
status
reviewing
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tepichord/milner#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Here are the notes from the previous attempt I made to setup talos with KVM on asahi linux (running on a mac mini). The steps are likely updated and will need to be corroborated with the up to date talos kvm documentation.
Naina:
Updated on 2026-08-20 based on maintainer feedback.
Overview
Replace the
null_resource+virt-installshell provisioner withlibvirt_domainresources, add Talos machine configuration and bootstrap viasiderolabs/talosprovider~> 0.11, and enable multi-node scaling (1 or 3 control-plane nodes). Replacestorage_pool_pathwith adata_root_pathbase-directory variable so all storage paths derive from a single mount point. Document the setup flow in README.md and update ARCHITECTURE.md with resource budget and storage distribution tables.Technical Approach
timeprovider for VM boot waitstorage_pool_pathwithdata_root_path+ derived localsExpected layout when pointed at external drive:
libvirt_poolto the derived localnull_resourcewithlibvirt_domainusingcountDelete dead files: remove
null_resource.control_plane_node_1block frommain.tf, deletepatches/controlplane-patch-1.yaml(replaced by inlineconfig_patches).Update
terraform.tfvarscleanup.shto useterraform destroyARCHITECTURE.md— resource budget for 3-node control-plane and storage distributionREADME.mdplan.tftest.hclImplementation Details
Files to modify:
control-plane/main.tf— replacenull_resource, addlibvirt_domain,talos_machine_*resources,data_root_pathvariable +locals,time_sleep, outputscontrol-plane/terraform.tfvars— add new variable defaultscontrol-plane/cleanup.sh— replacetalosctl cluster destroy+ manual virsh withterraform destroycontrol-plane/tests/plan.tftest.hcl— extend mock-provider assertions, addtimemock providerARCHITECTURE.md— update naina resource budget for 3-node scenario, add storage distribution tableREADME.md— add "Setup" section with example-forward install stepsAGENTS.md— bump provider versions in Tech Stack tableFiles to delete:
control-plane/patches/controlplane-patch-1.yaml— replaced by inlineconfig_patchesNo new files to create — UEFI firmware is configured via the native
firmware+nvramattributes onlibvirt_domain(v0.8.3), avoiding the need fordomain.xsl.Dependencies:
siderolabs/talosprovider~> 0.11(upgrade from~> 0.9)dmacvicar/libvirtprovider~> 0.8(upgrade from~> 0.7)hashicorp/timeprovider~> 0.14(new — VM boot wait)edk2-aarch64package on naina (AAVMF firmware at/usr/share/AAVMF/)Constraints:
wait_for_lease = falseis mandatory — broken on libvirt provider > 0.7.1cpu { mode = "host-passthrough" }omitted on aarch64 (no-op)talos_machine_bootstraponly needed whencontrol_plane_count > 1(single-node clusters self-bootstrap)time_sleep(120s) between domain creation and config apply — Talos API needs boot time beforeApplyConfigurationgRPC callfirmware+nvramnative attributes replacedomain.xsl—libvirt_domainv0.8.3 supports bothOut-of-scope notes:
control-plane-net.xslis retained as-iscontrol_plane_count = 3; single-node uses the node IP as endpointAcceptance Criteria
null_resource.control_plane_node_1is removed; VM lifecycle managed bylibvirt_domaindata_root_pathvariable replacedstorage_pool_path; libvirt pool path derived vialocal.libvirt_pool_pathterraform -chdir=control-plane plansucceeds withcontrol_plane_count = 1terraform -chdir=control-plane plansucceeds withcontrol_plane_count = 3control-plane/patches/controlplane-patch-1.yamlis deletedterraform -chdir=control-plane testpasses with updated mock-provider assertionsterraform fmt -check,shellcheckoncleanup.sh)README.mdhas a "Setup" section with copy-pasteable install commandsARCHITECTURE.mdhas an updated resource budget table and a storage distribution tableTesting Plan
plan.tftest.hcl):libvirt_volume.control_plane_diskcount =control_plane_counttalos_machine_secrets.thisis presenttalos_machine_configuration_apply.control_planecount =control_plane_counttests/test_static.py):terraform fmt -check,shellcheckoncleanup.shterraform applywithcontrol_plane_count = 1, verifytalosctl healthpassesRelated Issues/PRs
PLAN.md— this issue fills the gaps (Talos config, multi-node support)looking at the architecture.md document, how would node scaling impact the resource distribution?
Naina has an external drive capable of storing the Kubernetes information, it has a 2TB capacity and the architecture.md document should be updated to account for storage distribution. Nonetheless, is it possible to store the control plane disk on that volume? Maybe define it’s location with a variable for the root folder to store k8 info?
You say update versions but talos is at v1.13? Did you even search for the latest versions? Or is there a compatibility issue with 1.13?
Naina:
Regarding resource distribution with 3 control-plane nodes: naina's 24 GB would be split 6 GB (3×2 GB control-plane) + 17-18 GB for the worker-large VM instead of the current 20 GB. The worker-large still has enough headroom for the Vault, Woodpecker, RabbitMQ, and orchestrator services currently budgeted at 4-6 GB. The
ARCHITECTURE.mdresource budget table should be updated to reflect this split.For the external 2TB drive: yes, you can store control-plane disks there. Add a
storage_pool_pathvariable that defaults to/var/lib/libvirt/images/talos-kvmbut can be pointed at the external drive mount (e.g.,/mnt/external/talos-kvm). Thelibvirt_pool'starget.pathalready supports this — just wire it to the variable. The directory needs to exist and be writable by theqemuuser.On the version question: Talos Linux v1.13 is the OS version, not the Terraform provider version. The
siderolabs/talosTerraform provider follows its own 0.x versioning and the latest stable is v0.11.0 (released 2026-04-27). It uses Talos SDK v1.13.0 and fully supports Talos Linux v1.13.x. There is no provider "v1.13" —~> 0.11is the correct and latest stable constraint.add a section to the README.md called setup detailing not only this but how to standup the control plane with terraform on naina from a fresh Linux install. It should be example forward with limited prose. Also the drive storage (and persistent kubernetes volumes should be added to ARCHITECTURE.MD as well as a table or diagram.
I want to know, this is one variable as it is that I have to define as a path, what happens when the next storage volume needs to be created? Will there be a second variable that I also have to point to this drive that I have? I would rather point to a base folder on the mounted drive and have an expected file structure exist from there (e.g. base is
/mnt/t9_drive/milner_data, images get stored at/mnt/t9_drive/milner_data/libvirt/images/talos-kvm)Naina:
Good call — a single
data_root_pathvariable that defines a base directory and derives all sub-paths from it is the right design. Here's how it works:The
libvirt_poolresource uses the local:target { path = local.libvirt_pool_path }. When you point it at your external drive (/mnt/t9_drive/milner_data), the expected layout becomes:Future storage needs (worker node disks, persistent volumes, etc.) can derive from the same
data_root_path— add a new local likeworker_pool_path = "${var.data_root_path}/images/worker-disks"without introducing a second variable. The updated plan will use this design.