Kind · metal.platform-kit.org/v1alpha1
ManagementEndpoint
A ManagementEndpoint is one BMC that the operator speaks to through Redfish. The operator makes it from an Asset. You read it to see if the BMC answers and what it reports.
At a glance
Section titled “At a glance”- Group and version
metal.platform-kit.org/v1alpha1- Scope
- Cluster. Short name:
mep. - Written by
- The operator. Do not write or edit a ManagementEndpoint.
- Reconciled by
- ManagementEndpoint controller reads the BMC. Endpoint convergence controller configures it.
- Name
- The name of the Asset.
- Owned by
- The Asset. One endpoint can own one or more Hosts.
- Phases
- Pending, Connecting, Inventorying, Verifying, Configuring, Ready, Unreachable, Mismatch.
- Source
- managementendpoint_types.go
How it connects
Section titled “How it connects”The Asset controller makes the endpoint and writes all of its spec.
The address comes from the ledger, the Secret from the Asset, and the TLS rule from the manager.
The ManagementEndpoint controller opens a session, reads the facts and compares them with the Asset. It does not write to the BMC.
The Host controller makes one Host for each entry in status.systems.
An EndpointProfile selects endpoints by their labels. The Endpoint convergence controller then configures the BMC and writes the condition Configured.
A HostOperation uses the endpoint to change the machine, for example with InsertMedia.
Use pk-metal status to see all endpoints, or pk-metal check to test one BMC without the operator.
Lifecycle
Section titled “Lifecycle”- The Asset controller makes the endpoint. The phase is Pending.
- The operator opens a Redfish session. The phase is Connecting.
- The operator reads the vendor, the model, the systems, the media slots and the firmware. The phase is Inventorying.
- The operator compares the MAC address and the serial number with the Asset. The phase is Verifying.
- If an EndpointProfile applies, the operator configures the BMC. The phase is Configuring.
- All conditions agree. The phase is Ready.
The operator reads the BMC again each 5 minutes. The flag --poll-interval of the manager sets this time.
| Phase | Meaning | The operator shows it when | Rule |
|---|---|---|---|
Pending | The ManagementEndpoint exists. The operator did not examine it yet. | The object has no conditions. | 1 |
Connecting | The operator tries to open a Redfish session. | Reachable is absent or Unknown. | 2 |
Inventorying | The operator reads the facts of the BMC: vendor, model, systems, media slots and firmware. | Inventoried is not True. | 5 |
Verifying | The operator compares the MAC address and the serial number with the Asset. | Verified is not True. | 6 |
Configuring | An EndpointProfile applies, and the operator configures the BMC. | Configured is present and not True. | 7 |
Ready | The BMC answers, the identity agrees, and the configuration is complete. | No other rule applies. | 8 |
Unreachable | Nothing answered at the address, or the login failed. | Reachable is False. | 3 |
Mismatch | The BMC at this address is not the machine that the Asset describes. The operator does nothing to it. | Verified is False. | 4 |
Type EndpointPhase in ManagementEndpointStatus.phase ·managementendpoint_types.go
How the operator verifies a BMC
Section titled “How the operator verifies a BMC”- MAC address
- If the BMC reports a MAC address and it is not
spec.bmcMacof the Asset,Verifiedis False with the reasonMACMismatch. - Serial number
- The operator collects the board serial number of the chassis and the serial number of each system. If
spec.serialof the Asset is one of them,Verifiedis True. - No match
Verifiedis False with the reasonSerialMismatch. The phase is Mismatch.- No data
- If the BMC reports no serial number,
Verifiedis Unknown and the phase stays Verifying.
Identity explains why the operator uses two sources.
Trust the BMC certificate
Section titled “Trust the BMC certificate”spec.tls tells how the operator checks the BMC. The manager flags set it for all endpoints.
spec.tls |
Check | Flag |
|---|---|---|
caSecretRef |
The certificate chain against the CA. | --bmc-ca-secret |
| Not set | The key that the BMC showed at the first contact (status.tlsPin). |
No flag |
insecureSkipVerify |
Nothing. For simulated BMCs only. | --bmc-insecure |
Without a CA, the operator reads the certificate of the BMC before it sends a login. At the first contact, it pins the key: status.tlsPin.source is FirstUse. After that, each session accepts only the pinned key, and the key of a certificate that an EndpointProfile pushed (Pushed).
If the BMC shows a different key, Reachable is False with the reason TLSKeyChanged, and the phase is Unreachable. The operator sends nothing to the BMC. The message gives the new key and the command to approve it.
-
Find out why the key changed. A new certificate on the BMC, a firmware update or a new board can change it. A device that poses as the BMC can also cause it.
-
Compare the key in the message with the key of the BMC. Run this on a workstation on the BMC network:
Terminal window openssl s_client -connect 192.0.2.21:443 </dev/null 2>/dev/null \| openssl x509 -pubkey -noout | openssl pkey -pubin -outform der \| sha256sum -
If the change is correct, approve the key. Use the value from the message.
Terminal window kubectl annotate managementendpoint asset-07 \metal.platform-kit.org/approve-tls-key=sha256:<64 hex digits>
The operator pins the approved key (Approved) only while the BMC shows it. Then it removes the annotation. Only a person who can update ManagementEndpoints can approve a key. The default roles give this to the admin group only.
status.authentication tells how the requests log in. Session is a Redfish session: the password crosses the network one time for each pass. Basic means that the BMC has no sessions, and each request carries the password.
The Asset controller writes the spec. A change that you make does not stay.
| Field | Type | Description |
|---|---|---|
addressrequired | string | Address is the BMC's https URL, from the ledger. It is how the operator reaches the machine, not what identifies it: a Host is identified by the serial number the BMC reports. |
assetRefrequired | object | AssetRef names the Asset this endpoint was made from, and whose serial and MAC it is checked against. |
namerequired | string | The name of the object. |
credentialsRef | object | CredentialsRef names the Secret (operator namespace) used to connect, defaulted from the Asset at materialization — the factory credentials, kept as standing break-glass. Once an EndpointProfile rotates the endpoint onto a managed account, every connect prefers the managed Secret and this ref is the repair fallback. |
name | string | The name of the object. |
tls | object | TLS says how the BMC's HTTPS certificate is checked, from the manager's --bmc-ca-secret or --bmc-insecure. Unset pins the BMC's key on first use (status.tlsPin): the operator trusts the key the BMC presents at the first contact, before it sends a password, and refuses any other key until a person approves it. |
caSecretRef | object | CASecretRef names a Secret (operator namespace, key ca.crt) with the CA that signed the BMC's certificate. Wins over insecureSkipVerify. |
name | string | The name of the object. |
insecureSkipVerify | boolean | InsecureSkipVerify accepts any certificate and pins nothing: every device that answers at the address gets the BMC password. For simulated BMCs in the lab only. The approval plan of an operation shows it, and the operator uploads no private key over it. |
Status
Section titled “Status”| Field | Type | Description |
|---|---|---|
asset | object | Asset caches the last-resolved assertion, so an asset-source outage degrades to the snapshot rather than failing resolution. |
bmcMac | string | |
cid | string | |
observedGeneration | integer (int64) | ObservedGeneration is the Asset generation this snapshot was resolved at. |
serial | string | |
vlan | integer | |
authentication | string | Authentication is how the operator's requests to this BMC authenticate: Session (a Redfish session; the password crosses the network once per pass, in the login) or Basic (the BMC offers no session, so each request carries the password).SessionBasic |
blockedOn | string | BlockedOn is derived — why the endpoint isn't advancing (e.g. SerialMismatch). |
boardSerial | string | BoardSerial is the chassis board serial — the Supermicro identity anchor (its ComputerSystem serves none; Huawei's matches the system serial). |
capabilities | object | EndpointCapabilities is what this BMC can do, as discovered. Vendors differ here, and the operator records the difference instead of assuming it. |
dualMedia | boolean | DualMedia is true when two virtual media slots can hold an image at the same time (Supermicro X12 yes, Huawei iBMC no). The install needs this to mount the installer and the config of the node together. |
identityDialect | string | IdentityDialect is how the HTTPS certificate of the BMC is replaced ("csr-native" | "key-upload" | "none"). The iBMC makes its CSR itself, and the key never leaves it. The X12 takes a certificate and a key that the operator makes, through an OEM upload. |
mediaDialects | map[string]string | MediaDialects maps media slot id → insert dialect ("insert-media" | "vmm-control" | "none"). |
updateDialect | string | UpdateDialect is the firmware-update method the BMC offers ("multipart-push" | "simple-update" | "none"). The operator proposes a firmware flash only over multipart-push, the one it has been tested with. |
conditions | []object | Conditions are the truth — the only thing reconcilers branch on. |
firmware | []object | Firmware lists the UpdateService inventory — the firmware-convergence observable (desired version vs the entries here), small and bounded (~5 members per vendor). Sorted by id. |
idrequired | string | |
updateable | boolean | |
version | string | |
firmwareVersion | string | FirmwareVersion is the manager's firmware as served. |
identityPushed | object | IdentityPushed is written by the endpoint convergence reconciler alone; the observing endpoint reconciler leaves it untouched — the two share this status with disjoint fields. |
fingerprintrequired | string | Fingerprint (sha256, hex) of the pushed leaf certificate. |
planHashrequired | string | PlanHash of the desired identity the push belonged to. |
publicKey | string | PublicKey of the pushed leaf certificate, in the form of TLSPin.PublicKey. Connections accept it next to the pinned key, so the BMC is reachable when it serves the pushed certificate. |
managerType | string | ManagerType is the discovered Redfish Manager type, kept opaque (BMC | EnclosureManager | RackManager | …). |
model | string | |
phase | string | Phase summarizes the conditions below for people and for kubectl columns. It is a summary, not the contract: automation should read conditions.PendingConnectingInventoryingVerifyingConfiguringReadyUnreachableMismatch |
systems | []object | Systems lists the machines (Redfish ComputerSystems) behind this BMC — usually one, several for a chassis with more than one node. It is kept like the rest of status: an unreachable endpoint keeps its last view. |
bootOverrideMode | string | BootOverrideMode is the BootSourceOverrideMode the system serves ("UEFI" | "Legacy"); empty when it serves none. A boot override asks for UEFI only where this field shows a different mode. The X12 reports Legacy on a machine that boots UEFI, and a system that serves no mode can refuse one. |
bootTargets | []string | BootTargets are the boot override targets the system allows (BootSourceOverrideTarget@Redfish.AllowableValues) — what a proposed boot override picks from, never assumed. |
idrequired | string | ID is the Redfish ComputerSystem member id behind this endpoint. |
lastResetTime | string (date-time) | LastResetTime as served by the ComputerSystem — the baseline-and-advance observable (X12 serves it, iBMC doesn't). Micro precision so back-to-back resets stay distinguishable. |
manufacturer | string | Manufacturer as served by the ComputerSystem — the machine's vendor, which on an aggregator path differs from the endpoint's vendor. |
model | string | |
serialNumber | string | SerialNumber as served by the ComputerSystem — the Huawei anchor; empty on Supermicro X12 (there the chassis board serial anchors). |
uuid | string | |
tlsPin | object | TLSPin is the BMC key the operator trusts when no CA checks the BMC (spec.tls names no CA and does not skip the check). A connection to a BMC that presents another key fails before a password is sent. |
publicKeyrequired | string | PublicKey is "sha256:" and the hex SHA-256 of the certificate's SubjectPublicKeyInfo. A renewed certificate with the same key keeps the pin. |
sourcerequired | string | Source says how the key came to be trusted: FirstUse, Approved or Pushed.FirstUseApprovedPushed |
vendor | string | Vendor is the discovered manufacturer ("Huawei" | "Supermicro" | …). |
virtualMedia | []object | VirtualMedia lists the media slots in the order of the endpoint's collection, with the media types of each slot. A boot selects its slots by this list: optical slots first, in this order. capabilities.mediaDialects tells how to insert media in each slot. |
idrequired | string | ID is the slot's Redfish member id ("CD", "VirtualMedia1", …). |
mediaTypes | []string | MediaTypes the slot advertises ("CD", "DVD", "USBStick", …). Empty says nothing — the iBMC's CD slot serves none. |
Columns of kubectl get managementendpoints (the columns marked wide show only with -o wide):
| Column | Value |
|---|---|
NAME | .metadata.name |
ADDRESS | .spec.address |
VENDOR | .status.vendor |
PHASE | .status.phase |
BLOCKEDwide | .status.blockedOn |
AGE | .metadata.creationTimestamp |
Conditions
Section titled “Conditions”| Condition | True means | Effect on the phase |
|---|---|---|
Reachable |
The BMC answers with a trusted certificate and the login works. Reason TLSKeyChanged when the BMC shows a key that is not pinned. |
Unreachable when False |
Inventoried |
The operator has the facts of the BMC. | Inventorying until True |
Verified |
The MAC address and the serial number agree with the Asset. | Mismatch when False |
Configured |
The BMC has the configuration of its EndpointProfiles. Absent when no profile applies. | Configuring until True |
DeletionHeld |
A person deleted the endpoint, but a claim holds its machine. | None |
Labels
Section titled “Labels”The operator puts labels on each endpoint. An EndpointProfile selects endpoints with them.
| Label | Value |
|---|---|
metal.platform-kit.org/vendor |
The vendor that the BMC reports. |
metal.platform-kit.org/model |
The model that the BMC reports. |
metal.platform-kit.org/vlan |
spec.vlan of the Asset. |
Labels, annotations and finalizers has all keys.
Example
Section titled “Example”You do not write a ManagementEndpoint. Read it with kubectl:
$ kubectl get mep -o wideNAME ADDRESS VENDOR PHASE BLOCKED AGEasset-07 https://[2001:db8:0:100::14] Huawei Ready 3dasset-08 https://[2001:db8:0:100::15] Huawei Mismatch SerialMismatch 3dFind why an endpoint is not Ready
Section titled “Find why an endpoint is not Ready”-
Read the phase and the column BLOCKED.
Terminal window kubectl get mep -o wide -
Read the conditions of the endpoint. The message of the condition gives the cause.
Terminal window kubectl describe mep asset-08 -
Use the table to find the next step.
| Phase | Cause | Next step |
|---|---|---|
| Unreachable | The address, the network, the login, the CA or the pinned key is wrong. | BMC unreachable |
| Mismatch | The Asset or the ledger names a different machine. | Host in Mismatch |
| Configuring | A profile is in progress, or the operator cannot apply it. | Read the reason of Configured in EndpointProfile. |