Controller · manager
ManagementEndpoint controller
The ManagementEndpoint controller observes one BMC through Redfish. It records the facts in the status of the ManagementEndpoint and compares them with the Asset.
At a glance
Section titled “At a glance”- Reconciles
- ManagementEndpoint (
For). Controller namemanagementendpoint. - Writes
- The observed part of the endpoint status, and discovery labels on the endpoint.
- Talks to
- The BMC, through a read-only Redfish session. It sends no write to the BMC.
- Requeue
- Each pass, after
--poll-interval(default 5 minutes). - Time limit
- 15 seconds for the connection and the discovery of one pass.
- Source
- managementendpoint_controller.go
Watches
Section titled “Watches”| Kind | Relation | Why a change starts a pass |
|---|---|---|
| ManagementEndpoint | For |
The Asset controller wrote the spec, or the poll interval ended. |
| Asset | Watches, through the index .spec.assetRef.name |
You corrected the serial or the MAC. The controller checks the identity again at once. |
Reconcile loop
Section titled “Reconcile loop”- Read the endpoint. If it has a deletion timestamp, stop. The controller has no finalizer.
- Copy
cid,serial,bmcMacandvlanof the Asset intostatus.asset. If the Asset is gone, keep the last copy. - Read the credentials and the CA from the namespace
pk-metal. A managed credential Secretendpoint-creds-<name>wins overspec.credentialsRef. - Open a read-only Redfish session. If the connection fails, set
Reachableto False. - Discover the manager, the chassis, the capabilities, the media slots, the systems and the firmware inventory. Set
Inventoriedto True. - Compare the BMC MAC and the serial numbers with the Asset copy. Set
Verified. - Stamp the phase. Update the discovery labels on the endpoint. Apply the status if it changed.
Guards and decisions
Section titled “Guards and decisions”- Read only
- The session has the read-only flag. Only the HostOperation controller and the Endpoint convergence controller write to a BMC.
- Two origins
- The Asset is what your organization says. Redfish is what the machine says. A mismatch is alert-and-hold: the phase stops and nothing destructive follows. See Identity.
- Serial anchors
- The controller collects every serial that discovery gives: the board serial of the chassis and the serial of each system. The Asset serial must be one of them.
- A slot list is optional
- If the BMC does not list its virtual media, the endpoint is still inventoried. It has no slot to boot from.
Writes
Section titled “Writes”| Object or field | When | Field manager |
|---|---|---|
Endpoint status: conditions Reachable, Inventoried, Verified, facts, asset, phase |
When the status changed | pk-metal-endpoint (server-side apply) |
| Endpoint labels from discovery (vendor, model, VLAN) | When they changed | manager (update) |
Conditions
Section titled “Conditions”| Condition | True means | False reasons |
|---|---|---|
Reachable |
A Redfish session is open (SessionUp). |
CredentialsMissing, CAMissing, DialError |
Inventoried |
Discovery wrote the facts (FactsGathered). |
DiscoveryError |
Verified |
The serial of the Asset is among the discovered serials (SerialMatch). |
MACMismatch, SerialMismatch. Unknown: NoAssertion, NoSerialAnchor |
Failure modes
Section titled “Failure modes”| You see | Cause | Do this |
|---|---|---|
Reachable=False, DialError |
No route to the BMC, wrong address, or TLS failure. | Use BMC unreachable. |
Reachable=False, CredentialsMissing |
The credentials Secret is missing or has no username and password. |
Correct the Secret. See Enroll hosts. |
Verified=False, SerialMismatch |
The Asset and the machine do not agree. | Use Host in Mismatch. |
Permissions
Section titled “Permissions”| API group | Resources | Verbs | Scope |
|---|---|---|---|
metal.platform-kit.org | managementendpoints | getlistwatchupdate | cluster |
metal.platform-kit.org | managementendpoints/status | patch | cluster |
metal.platform-kit.org | assets | getlistwatch | cluster |
core | secrets | getlistwatch | namespace pk-metal |