Skip to content

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.

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

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.

ManagementEndpoint phases. An endpoint moves from Pending to Ready. Unreachable and Mismatch are stops.PendingConnectingInventoryingVerifyingConfiguringwith a profileReadyfirst passReachableInventoriedVerifiedConfiguredUnreachableMismatchReachable FalseVerified FalseThe operator continues to read the BMC.A stop ends when the condition changes.
ManagementEndpoint phases. Each arrow has the condition that becomes True.
  1. The Asset controller makes the endpoint. The phase is Pending.
  2. The operator opens a Redfish session. The phase is Connecting.
  3. The operator reads the vendor, the model, the systems, the media slots and the firmware. The phase is Inventorying.
  4. The operator compares the MAC address and the serial number with the Asset. The phase is Verifying.
  5. If an EndpointProfile applies, the operator configures the BMC. The phase is Configuring.
  6. 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.

PhaseMeaningThe operator shows it whenRule
PendingThe ManagementEndpoint exists. The operator did not examine it yet.The object has no conditions.1
ConnectingThe operator tries to open a Redfish session.Reachable is absent or Unknown.2
InventoryingThe operator reads the facts of the BMC: vendor, model, systems, media slots and firmware.Inventoried is not True.5
VerifyingThe operator compares the MAC address and the serial number with the Asset.Verified is not True.6
ConfiguringAn EndpointProfile applies, and the operator configures the BMC.Configured is present and not True.7
ReadyThe BMC answers, the identity agrees, and the configuration is complete.No other rule applies.8
UnreachableNothing answered at the address, or the login failed.Reachable is False.3
MismatchThe 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

MAC address
If the BMC reports a MAC address and it is not spec.bmcMac of the Asset, Verified is False with the reason MACMismatch.
Serial number
The operator collects the board serial number of the chassis and the serial number of each system. If spec.serial of the Asset is one of them, Verified is True.
No match
Verified is False with the reason SerialMismatch. The phase is Mismatch.
No data
If the BMC reports no serial number, Verified is Unknown and the phase stays Verifying.

Identity explains why the operator uses two sources.

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.

  1. 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.

  2. 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
  3. 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.

FieldTypeDescription
addressrequiredstringAddress 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.Pattern: ^https://
assetRefrequiredobjectAssetRef names the Asset this endpoint was made from, and whose serial and MAC it is checked against.
namerequiredstringThe name of the object.
credentialsRefobjectCredentialsRef 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.
namestringThe name of the object.Default:
tlsobjectTLS 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.
caSecretRefobjectCASecretRef names a Secret (operator namespace, key ca.crt) with the CA that signed the BMC's certificate. Wins over insecureSkipVerify.
namestringThe name of the object.Default:
insecureSkipVerifybooleanInsecureSkipVerify 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.
FieldTypeDescription
assetobjectAsset caches the last-resolved assertion, so an asset-source outage degrades to the snapshot rather than failing resolution.
bmcMacstring
cidstring
observedGenerationinteger (int64)ObservedGeneration is the Asset generation this snapshot was resolved at.
serialstring
vlaninteger
authenticationstringAuthentication 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
blockedOnstringBlockedOn is derived — why the endpoint isn't advancing (e.g. SerialMismatch).
boardSerialstringBoardSerial is the chassis board serial — the Supermicro identity anchor (its ComputerSystem serves none; Huawei's matches the system serial).
capabilitiesobjectEndpointCapabilities is what this BMC can do, as discovered. Vendors differ here, and the operator records the difference instead of assuming it.
dualMediabooleanDualMedia 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.
identityDialectstringIdentityDialect 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.
mediaDialectsmap[string]stringMediaDialects maps media slot id → insert dialect ("insert-media" | "vmm-control" | "none").
updateDialectstringUpdateDialect 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[]objectConditions are the truth — the only thing reconcilers branch on.
firmware[]objectFirmware lists the UpdateService inventory — the firmware-convergence observable (desired version vs the entries here), small and bounded (~5 members per vendor). Sorted by id.
idrequiredstring
updateableboolean
versionstring
firmwareVersionstringFirmwareVersion is the manager's firmware as served.
identityPushedobjectIdentityPushed is written by the endpoint convergence reconciler alone; the observing endpoint reconciler leaves it untouched — the two share this status with disjoint fields.
fingerprintrequiredstringFingerprint (sha256, hex) of the pushed leaf certificate.
planHashrequiredstringPlanHash of the desired identity the push belonged to.
publicKeystringPublicKey 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.
managerTypestringManagerType is the discovered Redfish Manager type, kept opaque (BMC | EnclosureManager | RackManager | …).
modelstring
phasestringPhase summarizes the conditions below for people and for kubectl columns. It is a summary, not the contract: automation should read conditions.PendingConnectingInventoryingVerifyingConfiguringReadyUnreachableMismatch
systems[]objectSystems 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.
bootOverrideModestringBootOverrideMode 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[]stringBootTargets are the boot override targets the system allows (BootSourceOverrideTarget@Redfish.AllowableValues) — what a proposed boot override picks from, never assumed.
idrequiredstringID is the Redfish ComputerSystem member id behind this endpoint.
lastResetTimestring (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.
manufacturerstringManufacturer as served by the ComputerSystem — the machine's vendor, which on an aggregator path differs from the endpoint's vendor.
modelstring
serialNumberstringSerialNumber as served by the ComputerSystem — the Huawei anchor; empty on Supermicro X12 (there the chassis board serial anchors).
uuidstring
tlsPinobjectTLSPin 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.
publicKeyrequiredstringPublicKey is "sha256:" and the hex SHA-256 of the certificate's SubjectPublicKeyInfo. A renewed certificate with the same key keeps the pin.Pattern: ^sha256:[0-9a-f]{64}$
sourcerequiredstringSource says how the key came to be trusted: FirstUse, Approved or Pushed.FirstUseApprovedPushed
vendorstringVendor is the discovered manufacturer ("Huawei" | "Supermicro" | …).
virtualMedia[]objectVirtualMedia 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.
idrequiredstringID is the slot's Redfish member id ("CD", "VirtualMedia1", …).
mediaTypes[]stringMediaTypes 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):

ColumnValue
NAME.metadata.name
ADDRESS.spec.address
VENDOR.status.vendor
PHASE.status.phase
BLOCKEDwide.status.blockedOn
AGE.metadata.creationTimestamp
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

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.

You do not write a ManagementEndpoint. Read it with kubectl:

Terminal window
$ kubectl get mep -o wide
NAME ADDRESS VENDOR PHASE BLOCKED AGE
asset-07 https://[2001:db8:0:100::14] Huawei Ready 3d
asset-08 https://[2001:db8:0:100::15] Huawei Mismatch SerialMismatch 3d
  1. Read the phase and the column BLOCKED.

    Terminal window
    kubectl get mep -o wide
  2. Read the conditions of the endpoint. The message of the condition gives the cause.

    Terminal window
    kubectl describe mep asset-08
  3. 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.