Select the matching profiles. If none matches, withdraw the in-flight identity material and remove Configured. A rotated account stays as it is.
Merge the profiles stanza by stanza. Two profiles that set the same stanza differently are a ProfileConflict.
Do not write to a BMC that is not Verified. The wrong-box guard holds every lane that writes.
Credentials: rotate the account of the operator when it is due (see below).
NTP: set the time servers if they differ.
Identity: get a certificate for bmc-<endpoint>.<domain> from cert-manager and push it to the BMC. It goes last, because a certificate needs a correct clock.
Set Configured to True with a summary and apply the share of this lane.
The lane rotates the account of the operator. The factory credentials in spec.credentialsRef stay as a break-glass login.
Generate a new password. Park it in the managed Secret as a candidate, next to the working one.
Set it on the BMC, through the managed login or the factory login.
Log in with the candidate.
If the login works, promote the candidate. If not, the working password stays.
The annotation metal.platform-kit.org/rotated-at on the managed Secret records the time of the last rotation. Each crash window heals on a later pass. See Rotate BMC credentials.
When no profile matches, the controller stops. It does not undo a rotation.
A key never outlives its push
A transient Secret carries the certificate request and, for some vendors, the private key. The controller deletes it when the BMC serves the new certificate.
Push once
status.identityPushed records that the BMC accepted a certificate and restarted. The controller does not push the same material twice.