infra_wiki

Node lifecycle

How a folly node goes from a NetBox device to an attested Talos node with a SPIRE identity, and back out, with the system that owns each step.

A folly node is an entry in clusters/folly/inventory/nodes.yaml, which terraform/netbox/folly applies into NetBox as a kubernetes-node device. fleetd on spore attests it and drives each run. Identity lists the statuses and who writes each, and Hardware inventory the nodes file.

At a glance#

  1. The owner adds the node to the nodes file in a pull request. Atlantis creates a planned device with no MAC address.
  2. The owner connects the machine to its node port. Firmware PXE loads signed iPXE from spore, then signed HookOS.
  3. HookOS proves its TPM identity and boot state to fleetd. fleetd records the MAC against the device's serial.
  4. fleetd checks every approved EK, then issues the LDevID and LAK certificates. Without an approved binding, the machine waits.
  5. The signed confirmation triggers admission. fleetd checks the reported switch port, starts a Tinkerbell provision Workflow and renders the Talos configuration.
  6. fleetd returns an install code wrapped to the TPM. The Workflow wipes the system disk, installs Talos and stores the code in META.
  7. Talos boots from disk and fetches its configuration from /talos/config with the UUID and code. The configuration supplies its static address.
  8. After the complete response, fleetd deletes the configuration and sets the device active.
  9. fleetd approves the worker's initial kubelet certificate only when its per-node bootstrap token and requested node name match. Kubernetes readiness remains separate.
  10. fleetd lists the active, attested node in spire-nodes.json, and spore's spire-server-fleet-entries registers the node's SPIRE entry, spiffe://lolwtf.ca/node/<name>, from it. The SPIRE agent then attests by LDevID and serves SVIDs, since each workload entry is parented to that node entry. Identity has the entries.

An unknown serial also waits. A machine must prove every EK that its inventory entry approves before fleetd issues an identity.

Actions after installation#

The owner requests an action through NetBox. Rufio uses the node's AMT address to boot it into HookOS when needed.

RequestResult
desired_action: provisionReinstalls an eligible node. HookOS attestation obtains the install code.
desired_action: attestBoots HookOS and attests the node.
desired_action: wipeErases the disk.
Status decommissioningStarts retirement: wipes and erases the entire disk, powers off the node and sets it offline.

Retirement also cordons the Kubernetes node, evicts its pods and deletes its cluster records before fleetd marks it offline.

A provision for an unsupported node, such as a TPM 1.2 node, wipes the disk and leaves it in HookOS. Control-plane installation additionally requires homelab.fleetd.controlPlanes; it is disabled by default.

See Identity for the credential terms and Tinkerbell for the Workflow components.

Who owns what#

ComponentWhat it ownsWhere it lives
Nodes fileEach node's name, serial, model, class, switch port, address, BMC type and approved EK bindingclusters/folly/inventory/nodes.yaml
terraform/netbox/follyThe device, its address and cable, its declared custom fields, the custom field definitions, fleetd's webhookAtlantis on offsite
NetBoxStatus, desired_action, verdicts, MACscapsule
fleetdAttestation, the LDevID and LAK, install codes, renewal, Hardware, Machine, Workflow, the rendered config, retirementspore
Boot planednsmasq, nginx, the signed iPXE and HookOS, at SPORE_BOOTSTRAP_IPspore
TinkerbellThe Tink server and Rufio, which run each Workflowspore
SPIREThe server, the agents, and tpm-reattestserver on spore, agents on the folly nodes
UniFi networkNode ports, each the Kubernetes network untagged, and that network's DHCP pool for netbooting machinesterraform/network/unifi/folly/bootstrap.tf, k8s.tf

Trust#

  • Firmware checks images against its Secure Boot database, which also contains Microsoft certificates. After the event-log separator, the node's class picks a policy profile in apps/fleetd/attest/policy/: talos accepts only the lab's signing authorities, and ubuntu also accepts Microsoft's UEFI CA and Canonical's Master CA. Intake requires HookOS. No profile pins an exact image digest.
  • The LDevID key stays in the TPM. fleetd signs every LDevID with spore's YubiKey CA, and the bundle keeps the LDevIDs capsule's and the software CA issued trusted until they renew.
  • A provision's wipe waits for the boot's pass and the install code, so a refused machine keeps its disk.
  • The running node renews its LDevID with a quote that its LAK signs. A decommissioning or offline device gets no renewal.
  • An authenticated quote that misses the policy quarantines a worker: fleetd refuses renewal and cordons it. SPIRE registration removal and existing credential expiry are separate. A control-plane failure records a failed verdict and alerts without a cordon; fleet-owned registration eligibility can change. Identity has the rules.

Where to go next#

Edit on GitHub

↑↓ move ↵ open esc close