Skip to content

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.

Reconciles
ManagementEndpoint (For). Controller name managementendpoint.
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
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.
The ManagementEndpoint reconcile loop: snapshot the Asset, connect, discover, verify, stamp the phase, apply the status.Read the endpoint1Stopgone, or being deletedCopy the Asset into status.assetkeep the last copy if it is gone2Read credentials and CA3Reachable = FalseCredentialsMissing / CAMissingOpen a read-only session4Reachable = FalseDialErrorDiscover the factsmanager, chassis, systems, media5Inventoried = FalseDiscoveryErrorCompare with the Asset6Verified = FalseMACMismatch / SerialMismatchStamp phase, apply status7next pass: after --poll-interval, or an Asset event
One pass of the ManagementEndpoint controller. No exit writes to the BMC.
  1. Read the endpoint. If it has a deletion timestamp, stop. The controller has no finalizer.
  2. Copy cid, serial, bmcMac and vlan of the Asset into status.asset. If the Asset is gone, keep the last copy.
  3. Read the credentials and the CA from the namespace pk-metal. A managed credential Secret endpoint-creds-<name> wins over spec.credentialsRef.
  4. Open a read-only Redfish session. If the connection fails, set Reachable to False.
  5. Discover the manager, the chassis, the capabilities, the media slots, the systems and the firmware inventory. Set Inventoried to True.
  6. Compare the BMC MAC and the serial numbers with the Asset copy. Set Verified.
  7. Stamp the phase. Update the discovery labels on the endpoint. Apply the status if it changed.
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.
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)
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
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.
API groupResourcesVerbsScope
metal.platform-kit.orgmanagementendpointsgetlistwatchupdatecluster
metal.platform-kit.orgmanagementendpoints/statuspatchcluster
metal.platform-kit.orgassetsgetlistwatchcluster
coresecretsgetlistwatchnamespace pk-metal