Skip to content

Kind · metal.platform-kit.org/v1alpha1

EndpointProfile

An EndpointProfile tells the operator how to configure a set of BMCs: the account of the operator, the time servers and the HTTPS certificate. You write it. The operator applies it to each BMC that the profile selects.

Group and version
metal.platform-kit.org/v1alpha1
Scope
Cluster.
Written by
You. Keep it in git.
Reconciled by
Endpoint convergence controller
Selects
ManagementEndpoints, by label.
Approval
None. The profile does not disturb the machine, thus the merge of the profile is the approval.
Status
None. Read the condition Configured of each ManagementEndpoint.
Source
endpointprofile_types.go
The operator merges the EndpointProfiles that match an endpoint. When the endpoint is verified, it applies credentials, then NTP, then TLS.Profilesmerge by layerVerifiedthe right BMC1 Credentialsmanaged account2 NTPtime servers3 TLScertificateConfigured is True when all lanes agree with the BMCThe first lane that is not completegives the reason of Configured.
The lanes of an EndpointProfile. The operator applies them in this order.

The controller finds the profiles whose spec.match selects the labels of an endpoint. It writes to the BMC only when the endpoint has the condition Verified. Thus the operator does not configure a wrong machine. The result is the condition Configured on the ManagementEndpoint.

A profile is one of the three types of convergence. A BiosProfile and a FirmwareProfile change the machine, and they need an approved HostOperation. An EndpointProfile does not. Credential rotation shows the credentials lane step by step.

Each part of the spec is one lane. A lane is active only when the profile has that part.

credentials
The operator makes its own account on the BMC and keeps the password in a Secret, endpoint-creds-<endpoint>. It makes a new password when the Secret is older than maxAge, 90 days by default. When the username changes, it disables the old account after the new one logs in.
ntp
The operator sets the time servers of the BMC. Then it reads them again to make sure that the BMC has them.
tls
The operator gets a certificate for bmc-<endpoint>.<domain> from cert-manager and puts it on the BMC. It gets a new certificate before the old one expires.
  1. The operator makes a new password and keeps it in the Secret, with the keys next-username and next-password.
  2. It sets the password on the BMC. It uses the managed account first, and the factory account second.
  3. It does a login with the new password.
  4. If the login works, the new password replaces the old one in the Secret.

If the BMC refuses the password, the old password stays in the Secret and continues to work. The operator does not change the factory account. That account is the way back to the BMC.

More than one profile can select the same endpoint. The operator merges them one part at a time.

  • The operator sorts the profiles by spec.layer. Profiles on one layer are in the order of their names.
  • A profile on a higher layer replaces the full part (credentials, ntp or tls) of a lower layer.
  • Two profiles on the same layer must agree on a part. If they do not, Configured is False with the reason ProfileConflict, and the operator writes nothing to that BMC.
  • An empty spec.match selects all endpoints.
FieldTypeDescription
credentialsobjectCredentials makes the operator run its own account on the manager: created through the asset's factory credentials, password kept in a managed Secret, rotated on cadence. A new password is kept beside the working one (keys next-username, next-password) and replaces it only after a login with it succeeds, so a manager that refuses it leaves the working password in place. When the username changes, the account it replaces is disabled once the new one logs in. The factory account is left untouched: it is the way back in after the managed password was changed behind the operator's back, and the way in at adoption.
maxAgestringMaxAge rotates the managed password when the Secret grows older than this; 90 days when unset. A copy of the Secret therefore stops working at the latest after this time. A rotation sets the new password through the managed account's own session first, so it works when the factory login no longer does.Default: 2160h
usernamerequiredstringUsername of the operator's managed account (role Administrator — the executor flashes firmware and resets the manager over it).Pattern: ^[a-z][a-z0-9-]{0,15}$
layerinteger (int32)Layer orders overlapping profiles: higher layers override lower ones, stanza by stanza. Profiles on the same layer must agree.Default: 0
matchrequiredobjectMatch selects ManagementEndpoints by label. Endpoints carry only discovered facts (vendor, model, vlan) — there is no claim, hence no intent axis. An empty selector matches every endpoint.
matchExpressions[]objectLabel requirements that the object must meet. All must match.
keyrequiredstringThe label key.
operatorrequiredstringIn, NotIn, Exists or DoesNotExist.
values[]stringThe values for In and NotIn. Exists and DoesNotExist take no values.
matchLabelsmap[string]stringLabels that the object must have, as key and value pairs. All must match.
ntpobjectNTP converges the manager's own clock sources. A skewed BMC clock is not cosmetic: it rejects freshly-issued certificates (NotBefore in its future) and mistimes every log line.
serversrequired[]stringServers, in preference order. At most three — the iBMC carries exactly three server slots.Bounds: 1 to 3 items
tlsobjectTLS runs the manager's HTTPS identity: a cert-manager-signed certificate for bmc-<endpoint>.<domain>, pushed over the vendor's dialect and renewed on cadence. The factory certificate is replaced and cannot be restored — a CA-signed identity is strictly better and the intended end state. A push restarts the manager, which drops its virtual media, so it waits while an approved operation on a machine behind the endpoint has not finished (reason IdentityPushHeld).
domainstringDomain completes the identity: CN and DNS SAN are bmc-<endpoint>.<domain>; the endpoint address, when an IP literal, is added as an IP SAN (clients often reach BMCs by IP address).Default: metal.internalBounds: at least 1 characters
durationstringDuration of issued certificates.Default: 2160h
issuerRefrequiredobjectIssuerRef names the cert-manager issuer (group cert-manager.io) that signs the identity.
kindstringThe kind of the object.IssuerClusterIssuerDefault: ClusterIssuer
namerequiredstringThe name of the object.Bounds: at least 1 characters
renewBeforestringRenewBefore re-issues when less than this remains on the served certificate. Must stay below duration.Default: 720h
subjectobjectSubject carries the organizational attributes of the identity. The iBMC's on-manager CSR generation requires country; everything else is cosmetic.
countrystring
localitystring
organizationstring
organizationalUnitstring
statestring

An EndpointProfile has no status.

The condition is on the ManagementEndpoint. It is absent when no profile selects the endpoint.

Status Reason Meaning
True InSync The BMC has the configuration of all lanes.
Unknown AwaitingVerification A profile selects the endpoint, but the endpoint is not Verified.
False ProfileConflict Two profiles on the same layer do not agree.
False RotationFailed The operator could not set a password that works. The old password stays.
False NTPFailed The operator could not set the time servers.
False NoIdentityTransport The BMC has no method to replace its certificate.
False AwaitingIssuance The certificate request has no signature yet.
False IdentityPushed The certificate is on the BMC, and the BMC restarts.
False IdentityPushHeld An operation runs on a machine of this BMC. The certificate waits for its end.
False IdentityPushFailed The BMC does not use the certificate that the operator sent, or the issued certificate does not carry the key of the request.
False AccountRetireFailed The account that a new username replaced still logs in. The operator tries again.
False TLSNotVerified The BMC takes a private key (key-upload dialect), and insecureSkipVerify checks nothing. The operator makes no key.
False TLSKeyNotPinned No key of the BMC is pinned yet. The observation of the endpoint pins it.

Conditions and reasons has the full text of each reason.

apiVersion: metal.platform-kit.org/v1alpha1
kind: EndpointProfile
metadata:
name: managed-bmcs
spec:
match:
matchLabels:
metal.platform-kit.org/vlan: "100"
credentials:
username: pk-metal
maxAge: 2160h
ntp:
servers: ["ntp.example.org"]
tls:
issuerRef:
name: internal-ca
subject:
country: XX
organization: Example Org
organizationalUnit: Metal

The labels that you can select are metal.platform-kit.org/vendor, metal.platform-kit.org/model and metal.platform-kit.org/vlan.

  1. Apply the profile.

    Terminal window
    kubectl apply -f profile.yaml
  2. Make sure that the endpoints go to the phase Ready.

    Terminal window
    $ kubectl get mep
    NAME ADDRESS VENDOR PHASE AGE
    asset-07 https://[2001:db8:0:100::14] Huawei Ready 3d
    asset-08 https://[2001:db8:0:100::15] Huawei Configuring 3d
  3. If an endpoint stays in Configuring, read the reason of Configured.

    Terminal window
    kubectl describe mep asset-08