Skip to content

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.

Process
One binary, manager, in the Deployment pk-metal-manager in the namespace pk-metal.
Wiring
SetupAll in 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-wipe in 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 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

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.

A matrix. Each row is a controller of the manager. Each column is a kind. A mark shows that the controller reconciles the kind, owns objects of it, or watches it.AssetManagementEndpointEndpointProfileHostHostClaimHostOperationBiosProfileBiosSettingsFirmwareProfileMaintenanceWindowBootAssetTalosClusterTalosNodeTalosRolloutEtcdBackupPolicyEtcdSnapshotSecretConfigMapJobassetasset reconciles Assetasset owns ManagementEndpoint objectsmanagementendpointmanagementendpoint watches Assetmanagementendpoint reconciles ManagementEndpointendpointconvergenceendpointconvergence reconciles ManagementEndpointendpointconvergence watches EndpointProfileendpointconvergence owns Secret objectshosthost watches ManagementEndpointhost reconciles Hosthost watches HostClaimhost watches HostOperationhost watches TalosNodeprotectionprotection watches ManagementEndpointprotection reconciles Hosthostclaimhostclaim watches Assethostclaim watches ManagementEndpointhostclaim watches Hosthostclaim reconciles HostClaimhostclaim watches HostOperationhostclaim watches BootAssethostclaim watches TalosNodehost-wipehost-wipe reconciles Hosthost-wipe watches HostOperationhost-wipe watches BootAssethostoperationhostoperation watches Hosthostoperation reconciles HostOperationconvergenceconvergence watches ManagementEndpointconvergence watches Hostconvergence watches HostClaimconvergence watches HostOperationconvergence watches BiosProfileconvergence reconciles BiosSettingsconvergence watches FirmwareProfileconvergence watches TalosNode (spec changes only)maintenancewindowmaintenancewindow reconciles MaintenanceWindowtalosnodetalosnode watches Hosttalosnode watches TalosClustertalosnode reconciles TalosNodetalosnode watches TalosRollouttalosnode owns Secret objectstalosnode watches ConfigMaptalosnode-membertalosnode-member watches HostClaimtalosnode-member watches HostOperationtalosnode-member reconciles TalosNodetalosclustertaloscluster watches Hosttaloscluster reconciles TalosClustertaloscluster watches TalosNodetaloscluster watches TalosRollouttaloscluster owns Secret objectsbootassetbootasset reconciles BootAssetbootasset watches TalosNodebootasset owns Secret objectsbootasset owns Job objectstalosrollouttalosrollout owns HostOperation objectstalosrollout watches TalosNodetalosrollout reconciles TalosRolloutrolloutproposerrolloutproposer reconciles TalosClusterrolloutproposer watches TalosNoderolloutproposer watches TalosRolloutetcdbackuppolicyetcdbackuppolicy reconciles EtcdBackupPolicyetcdbackuppolicy watches EtcdSnapshotetcdsnapshotetcdsnapshot reconciles EtcdSnapshotFor: the kind it reconcilesOwns: it makes these objectsWatches: an event starts a passspec changes only
Who watches what. Select a controller or a kind to open its page.

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. Each row reads from left to right: an object, the controller that reads it, and what that controller writes.FindAssetyou writeManagementEndpointBMCread onlyassetmanagementendpointProjectManagementEndpointstatusHostfinalizersclaim protectionhostprotectionInstallHostClaimyou writeHostOperationproposalBMC and Talosafter approvalhostclaimhostoperationRenderTalosNodeyou writeconfig Secretby digestBootAssettalosnodebootassetClusterTalosClusteryou writeetcd and credentialsbootstrap oncetalosclusterRoll outTalosClusterversion, driftTalosRolloutplanHostOperationone per noderolloutproposertalosrolloutConvergeBiosProfileand FirmwareProfileBiosSettingsHostOperationproposalconvergenceconvergenceConfigureEndpointProfileyou writeBMCaccounts, NTP, TLSendpointconvergenceBack upEtcdBackupPolicyyou writeEtcdSnapshotsinkS3 or volumeetcdbackuppolicyetcdsnapshotScheduleMaintenanceWindowyou writestatusopen, next changemaintenancewindow
Who writes what. A violet pill is a controller. Select it to open its page.
Conditions are the facts
A controller writes conditions. Only internal/phase writes status.phase and status.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 patch on 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 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