Skip to content

Controller · manager

Host controller

The Host controller makes one Host for each physical machine that a BMC reports. It joins the facts of all endpoints that front the machine, and derives the lifecycle conditions from the claim, the operations and the Talos node.

Reconciles
Host (For). Controller name host.
Key
The normalized identity of the machine: the name that identity.Name makes from the vendor and the serial.
Writes
The Host object, its owner references and labels, and the projected part of its status.
Talks to
Nothing outside the cluster. It reads only Kubernetes objects.
Requeue
None. Events on endpoints, operations, claims and Talos nodes start the next pass.
Source
host_controller.go
Kind Relation Why a change starts a pass
Host For A person set or removed an annotation, or a claim bound the Host.
ManagementEndpoint Watches, index .status.systems.hostName A BMC reported new facts, or an endpoint went down.
HostOperation Watches, index .spec.hostRef.name An operation waits for approval, started or ended.
HostClaim Watches The claim that binds the Host changed or is deleted.
TalosNode Watches The node that the Host runs became reachable or ready.
The Host reconcile loop: find the paths, make the Host, read the claim and the node, project the conditions, stamp the phase.List the endpoints that front it1Stopno path leftCreate or update the Hostowner refs: every fronting endpoint2Read the bound claimonly if its UID matches claimRef3Stamp the managed labelsasset, vendor, model, claim labels4Read the TalosNode of spec.os5Project the conditionspaths, identity, approval, drift, OS6Stamp phase, apply status7next pass: an event on an endpoint, operation, claim or node
One pass of the Host controller.
  1. List the endpoints whose discovered systems have this Host name. If none is left, stop. Garbage collection or a person removes the Host.
  2. Create or update the Host. Each fronting endpoint is an owner. If all endpoints are on their way out, do not make a new Host.
  3. Read the claim that spec.claimRef names, if its UID still matches.
  4. Stamp the managed labels: asset, vendor, model, and the labels that the claim asks for.
  5. Read the TalosNode that spec.os names.
  6. Project the conditions: Reachable, Inspected, Verified, Maintenance, ApprovalPending, Drifted, Booted, OSReady, DeletionHeld and DiskWiped.
  7. Stamp the phase and blockedOn. Apply the status if it changed.
Multipath
Two endpoints that report the same identity make one Host. status.managedBy lists each path and whether it answers. The Host is Reachable while one path answers.
Identity diverged
If two paths report a different identity, Inspected is False with IdentityDiverged.
Drift
If the reset time of the machine moves forward and no operation explains it, Drifted is True with UnexpectedReset. It is information only.
Disk not wiped
If the Host has the annotation metal.platform-kit.org/disk-not-wiped, DiskWiped is False. The machine may still hold the install of an old node. See pk-metal wipe.
Maintenance
The annotation metal.platform-kit.org/maintenance sets Maintenance to True. The phase becomes Maintenance. See Put a host in maintenance.
Object or field When Field manager
Host object and owner references Each pass manager (create or update)
Host labels (managed subset, listed in an annotation) When they changed manager (update)
Host status, all but the convergence share When the status changed pk-metal-host (server-side apply)

The Convergence controller owns BiosConverged, FirmwareConverged, SystemFirmwareConverged and the firmware plan memory. This controller never names them.

Condition Source of the fact
Reachable At least one endpoint path is Reachable (PathUp, AllPathsDown).
Inspected All paths agree on the identity (RedfishFacts, IdentityDiverged).
Verified Each endpoint is Verified (AllPathsVerified, Verifying, or the endpoint reason).
Maintenance The maintenance annotation (HostInMaintenance).
ApprovalPending The oldest operation on the Host that waits for approval. The reason names its domain.
Drifted The reset time (UnexpectedReset, ResetExplained).
Booted The TalosNode is MachineReachable.
OSReady The TalosNode Ready condition, copied. NodeNotFound, AwaitingContact when unknown.
DeletionHeld A deleted Host that a claim still holds (HostClaimed).
DiskWiped False with InstalledNodeRemains or WipeRequested.
You see Cause Do this
Phase stays Inspecting, Verified=False The serial does not agree. Use Host in Mismatch.
Reachable=False, AllPathsDown No BMC answers. Use BMC unreachable.
OSReady not True after install The node did not check in. Use Node not ready.
API groupResourcesVerbsScope
metal.platform-kit.orghostsgetlistwatchcreateupdatecluster
metal.platform-kit.orghosts/statuspatchcluster
metal.platform-kit.orgmanagementendpointsgetlistwatchcluster
metal.platform-kit.orghostoperationsgetlistwatchcluster
metal.platform-kit.orghostclaimsgetlistwatchcluster
os.platform-kit.orgtalosnodesgetlistwatchcluster