Reference · manager
Controllers
The Manager is one process. It runs one controller for each kind that it reconciles. Each controller reads objects, compares them with the world, and writes only its own part of the status.
At a glance
Section titled “At a glance”- Process
- One binary,
manager, in the Deploymentpk-metal-managerin the namespacepk-metal. - Wiring
SetupAllin setup.go wires 14 lanes, in a fixed order. A lane is one or more controllers.- Named controllers
- 18. Some lanes have a helper controller, for example
host-wipein the HostClaim lane. - Leader election
- Optional, with
--leader-elect. All controllers run in the leader only. - Writers to a BMC
- Two: the HostOperation controller after approval, and the Endpoint convergence controller for the BMC settings. All other controllers only read.
The lanes
Section titled “The lanes”The table shows the lanes in the order that SetupAll wires them.
| # | Lane | Controller names | Reconciles |
|---|---|---|---|
| 1 | Asset | asset |
Asset |
| 2 | Endpoint | managementendpoint |
ManagementEndpoint |
| 3 | Host | host |
Host |
| 4 | HostClaim | hostclaim, host-wipe |
HostClaim, Host |
| 5 | Protection | protection |
Host |
| 6 | HostOperation | hostoperation |
HostOperation |
| 7 | Convergence | convergence |
BiosSettings |
| 8 | EndpointConvergence | endpointconvergence |
ManagementEndpoint |
| 9 | TalosNode | talosnode, talosnode-member |
TalosNode |
| 10 | TalosCluster | taloscluster |
TalosCluster |
| 11 | BootAsset | bootasset |
BootAsset |
| 12 | EtcdBackup | etcdbackuppolicy, etcdsnapshot |
EtcdBackupPolicy, EtcdSnapshot |
| 13 | TalosRollout | talosrollout, rolloutproposer |
TalosRollout, TalosCluster |
| 14 | MaintenanceWindow | maintenancewindow |
MaintenanceWindow |
Who watches what
Section titled “Who watches what”A controller starts a pass when an object of a kind that it watches changes.
The matrix shows the For, Owns and Watches calls of each SetupWithManager function.
Read the matrix in two directions:
- Read a row to see what wakes a controller.
- Read a column to see which controllers react when you change an object of that kind.
Who writes what
Section titled “Who writes what”Rules that all controllers obey
Section titled “Rules that all controllers obey”- Conditions are the facts
- A controller writes conditions. Only
internal/phasewritesstatus.phaseandstatus.blockedOn, from the conditions. See Phases and conditions. - One field, one owner
- The Host and the ManagementEndpoint each have two status writers. Each writer applies only its own fields with server-side apply, under its own field manager.
- Propose, never approve
- A controller that wants to change a machine creates a HostOperation. The manager RBAC has no
patchon operations, so no controller can approve one. See Approval. - Hold, do not destroy
- If an input is wrong, the controller sets a condition to False and keeps the last good state. A mismatch never wipes or powers off a machine.
- Level-triggered
- Each pass reads the world again and decides from what it sees. A controller does not keep a memory that a restart can lose, except where a status field records it.
Field owners
Section titled “Field owners”| Field manager | Writes | Controller |
|---|---|---|
pk-metal-endpoint |
ManagementEndpoint status, except Configured and identityPushed |
ManagementEndpoint controller |
pk-metal-endpoint-convergence |
ManagementEndpoint Configured condition and identityPushed |
Endpoint convergence controller |
pk-metal-protection |
ManagementEndpoint DeletionHeld condition |
Protection controller |
pk-metal-host |
Host status, except the convergence part | Host controller |
pk-metal-host-convergence |
Host BiosConverged, FirmwareConverged, SystemFirmwareConverged, firmwareProposed, systemFirmwareProposed |
Convergence controller |
manager |
All other status writes (update, not apply) | all other controllers |
Related
Section titled “Related”- Manager: flags, leader election, metrics and the imager Job.
- Architecture: where the manager runs and what it talks to.
- Rack to running node: the controllers in the order that a new machine meets them.