Skip to content

Kind · metal.platform-kit.org/v1alpha1

HostOperation

A HostOperation is one planned change to one machine: an install, a reboot, a BIOS change, a firmware flash. It lists the actions in order. A person approves it, then the operator runs it and records each step.

Group and version
metal.platform-kit.org/v1alpha1
Scope
Namespaced. The operator makes its operations in the pk-metal namespace.
Written by
A controller (the proposal) or a person. The approver writes only spec.approval.approvedBy.
Reconciled by
HostOperation controller, the only writer to a BMC.
Acts on
One Host, through spec.hostRef. The Talos actions also name its TalosNode.
Phases
Proposed, AwaitingApproval, Running, Succeeded, Failed, Aborted.
Frozen after creation
hostRef, actions, proposedBy, rolloutRef and approval.required.
Source
hostoperation_types.go

These controllers propose operations:

You approve with pk-metal approve, stop with pk-metal abort and run again with pk-metal retry. The actions are in the action catalog, for example PowerCycle and TalosUpgrade. Approval explains why a person approves each change. Approval flow shows the full path.

HostOperation phases. Proposed, AwaitingApproval, then Running, then Succeeded or Failed. An approved operation that a gate holds shows Proposed with blockedOn. An abort ends it as Aborted.Proposedno condition yetAwaitingApprovalApproved=FalseRunningExecutingSucceededExecuted=TrueProposed+ blockedOn: a gate holdsFailedExecuted=FalseAbortedExecuted=False, Abortedapprovedall stepsa gate holdsgate opensa step failsmetal.platform-kit.org/abort
HostOperation phases. The phase comes from the Approved and Executed conditions.
  1. A controller or a person creates the operation. The phase changes from Proposed to AwaitingApproval.
  2. A person approves it. The gates start. The site setting selfApproval tells if the proposer can approve, see Admission policies.
  3. A gate can hold the operation. The phase shows Proposed again, and blockedOn gives the reason.
  4. All gates open. The operator records a baseline and the phase is Running.
  5. Each action runs in order. When all actions reach their goal, the phase changes to Succeeded.
  6. An action fails. The phase changes to Failed. The operator does not retry it.
  7. A person aborts it. The phase changes to Aborted.

The steps below show one operation from the proposal to its end.

The life of one HostOperation

1 / 8

A controller proposes a HostOperation. A person approves it. Five gates can hold it: abort, rollout, maintenance window, self guard and cluster guard. Then the steps run and the operation ends.ControllerproposesHostOperation-YouapprovecreatesapprovesAbort?metal.platform-kit.org/abortRolloutrolloutRefWindowMaintenanceWindowSelf guardoperator's machinesCluster guardone control planebaseline, then stepsSteps-End-A held operation changes nothing. It starts when the gate opens.

Propose

A controller or a person creates the HostOperation. spec.actions lists each action in order. Nothing changes on the machine.

kubectl get hostoperations -A
  1. Propose. A controller or a person creates the HostOperation. spec.actions lists each action in order. Nothing changes on the machine.

    kubectl get hostoperations -A
  2. Approve. A person reads the actions and approves. Admission makes sure that the approver is a person, not the operator.

    pk-metal approve pk-metal/bios-sim-0001-1a2b3c
  3. Abort gate. If a person set metal.platform-kit.org/abort before the start, the operation ends at once as Aborted. The machine did not change.

  4. Rollout gate. An operation with spec.rolloutRef starts only if its TalosRollout is approved for the same plan hash and lists the same actions. If not, it fails with RolloutRefused.

  5. Maintenance window. If a MaintenanceWindow covers the Host and no window is open, the operation waits. The phase is Proposed and blockedOn is OutsideMaintenanceWindow.

    kubectl annotate hostoperation -n pk-metal <op> metal.platform-kit.org/ignore-window="<username>: <reason>"
  6. Guards. A disruptive operation waits while it would reboot a machine that the operator runs on, or take down a second control plane. blockedOn is SelfDisruption or ClusterDisruption.

  7. Steps. The operator records a baseline, then runs each action in order. Each action checks its goal before it acts. A wait has a time budget.

    drain → talosReboot → waitNodeReady → uncordon
  8. Finish. All actions reach their goal: Succeeded. An action fails: Failed, and nothing retries it. An abort between two actions undoes media, boot override and cordon: Aborted.

    pk-metal retry pk-metal/<op>

An operation needs approval unless spec.approval.required is false. Omitted means true: the safe default is a closed gate.

A ValidatingAdmissionPolicy enforces these rules:

  1. Nobody can create an operation that is already approved.
  2. spec.proposedBy must be the user who creates the operation.
  3. Only the operator or an admin can create an operation with required: false.
  4. approvedBy must be the user who approves.
  5. The proposer cannot approve the proposal.
  6. An approval cannot change after it is set.

To refuse a proposal, delete it. To stop new proposals for a claim, use pk-metal hold.

An operation with spec.rolloutRef has no approval of its own. The approval of its TalosRollout covers it. Before the operation starts, the operator makes sure that:

  • the rollout exists and is not aborted,
  • the rollout approval names the same planHash as the operation,
  • the plan has a step for this node on this Host,
  • the actions of the operation are the actions of that step.

If one of these is not true, the operation fails with reason RolloutRefused. The machine does not change. After the start, the operator does not do this check again.

An approved operation starts only when all gates open. The operator checks them in this order.

Gate Holds when blockedOn Release
Abort metal.platform-kit.org/abort is set none: ends as Aborted none
Rollout the rollout does not cover the operation none: ends as Failed (RolloutRefused) none
Queue another operation holds the Host OperationQueued wait
Host maintenance the Host has metal.platform-kit.org/maintenance HostInMaintenance remove the annotation
Window a MaintenanceWindow covers the Host and none is open OutsideMaintenanceWindow wait, or metal.platform-kit.org/ignore-window
Self guard a disruptive action targets a machine that runs the operator SelfDisruption metal.platform-kit.org/allow-self-disruption on the Host
Cluster guard a disruptive action would take down a second control plane, or etcd is not fully healthy without this node ClusterDisruption wait, or metal.platform-kit.org/override-cluster-guard

Only one operation runs on a Host at a time. An operation that started holds the Host until it ends. Of the others, the oldest goes first.

A new install (spec.reason: Provisioning) ignores maintenance windows: it stops no workload. The cluster guard checks again before each disruptive action, not only at the start. Self-protection explains the two guards.

Set these annotations on the HostOperation. The value tells who asked and why.

metal.platform-kit.org/abort

Stops the operation. If it did not start, it ends at once. If it runs, it stops before the next action. An action that already acted finishes first. Then the operator ejects the media, clears the boot override and uncordons the node that this operation cordoned. The phase changes to Aborted. The value is <user name>: <reason>. pk-metal abort sets it.

metal.platform-kit.org/retry

On a failed BIOS or firmware proposal: the operator deletes it and proposes the same plan again, as a new operation that waits for approval. pk-metal retry sets it. For other operations, retry deletes the failed operation and the controller proposes it again.

metal.platform-kit.org/override-cluster-guard

Lets a disruptive action take down a control plane when etcd is not fully healthy. Use it to repair a broken etcd or for a cluster with one control plane. It does not lift the rule "one control plane at a time", and it does not lift self-protection. The value is <username>: <reason>. See Audit trail.

metal.platform-kit.org/ignore-window
Lets the operation start outside the maintenance windows. The value is <username>: <reason>. pk-metal restore sets it, because a cluster without etcd is already down.
  • Check, then act. Each action checks its goal first. A goal that is already true is a success with no change.
  • Resume, never repeat. The operator writes each step to status.steps when the step ends. After a restart, it continues after the last recorded step.
  • A wait is not a failure. A BMC or a node that does not answer is a wait. Each action has a time budget. When the budget ends, the step fails.
  • No automatic retry. A failed step fails the operation. The record stays until a person retries or deletes it.
  • One power action. An operation has at most one powerCycle or powerOff.
  • No BMC for Talos actions. An operation with only Talos and Kubernetes actions runs while the BMC is down.

The action catalog gives the budget and the guard for each action.

Rules for the whole spec (the API server refuses a change that breaks one):

  • proposedBy is frozen after creation
  • requestedBy is frozen after creation
  • ttlSecondsAfterFinished is frozen after creation
  • rolloutRef is frozen after creation
FieldTypeDescription
actionsrequired[]objectActions run in order; each entry is exactly one action. A failed step fails the operation — disruptive one-shots never auto-retry. At most one power action per operation: the power-cycle proof lives in status once.Bounds: 1 to 32 items
  • Rule: at most one power action per operation
  • Rule: actions are frozen after creation
applyBiosobjectApplyBios stages a BiosSettings object's desired attributes into the machine's pending (@Redfish.Settings) object. Staging changes nothing — the world moves at the next system reset, so a convergence operation pairs this with a powerCycle.
attributesrequiredmap[string]anyAttributes are the values to stage, copied in at proposal time — what the approver saw is exactly what is applied. Keys already current are left out; keys already staged with the wanted value are PATCHed again with the rest, so the staging carries the apply time this client asks for, and a refusal to stage only such keys again counts as staged.Bounds: at least 1 entries
settingsRefobjectSettingsRef names the BiosSettings the attributes came from — provenance only: the executor never reads it, so an edit after approval cannot change what runs.
namerequiredstringThe name of the object.
awaitCheckInobjectAwaitCheckIn waits, without touching the machine, until the named TalosNode reports that the machine runs its config — the point after which the boot media are no longer needed. It changes nothing; it keeps the operation (and the grants it issued) alive until the hand-off.
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) whose check-in ends the wait: MachineReachable=True over the authenticated machine API, or Ready=True.
namerequiredstringThe name of the object.
timeoutSecondsinteger (int32)TimeoutSeconds bounds the wait, counted from the previous step's end. Running out fails the step — the media are ejected and the grants revoked either way.Default: 1800Bounds: 60 to 86400
cordonobjectCordon marks the node's Kubernetes Node unschedulable. Already cordoned is success.
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org); its hostname is the Kubernetes Node's name.
namerequiredstringThe name of the object.
deleteKubernetesNodeobjectDeleteKubernetesNode deletes the node's Node object from its cluster's Kubernetes API, the last trace of a removed node there. Already gone is success.
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org); its name is the Kubernetes Node's name, and its cluster says which Kubernetes API to ask.
namerequiredstringThe name of the object.
drainobjectDrain evicts the pods on the node through the Eviction API, so that PodDisruptionBudgets hold: an eviction a budget refuses is waited out, not forced, until the timeout fails the step. The node stays cordoned either way. A node not yet cordoned is cordoned first.
deleteEmptyDirDatabooleanDeleteEmptyDirData lets the drain evict pods with emptyDir volumes, whose data is lost. Without it such a pod fails the step.
gracePeriodSecondsinteger (int32)GracePeriodSeconds overrides each pod's termination grace period; unset keeps the pod's own.Bounds: 0 to 3600
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) to drain.
namerequiredstringThe name of the object.
timeoutSecondsinteger (int32)TimeoutSeconds bounds the whole drain, budget waits included. Running out fails the step and leaves the node cordoned.Default: 900Bounds: 30 to 86400
ejectMediaobjectEjectMedia unmounts a virtual-media slot.
mediaIdrequiredstringMediaID is the virtual-media slot to empty.
etcdForfeitLeadershipobjectEtcdForfeitLeadership hands etcd leadership to another member when the node's member leads, asked on the node itself; a follower is left as it is. A control plane that is about to leave or go down does it first, so that its departure does not cost an election under load.
nodeRefrequiredobjectNodeRef names the control-plane TalosNode (os.platform-kit.org) whose member gives up leadership.
namerequiredstringThe name of the object.
etcdLeaveobjectEtcdLeave makes the node's etcd member leave the cluster, asked on the node itself: the orderly removal of a control plane that still answers.
nodeRefrequiredobjectNodeRef names the control-plane TalosNode (os.platform-kit.org) that leaves.
namerequiredstringThe name of the object.
etcdRecoverobjectEtcdRecover restores the etcd of a cluster that lost all of it from an EtcdSnapshot, on one control plane: a person uploads the decrypted snapshot (pk-metal restore upload), then Talos starts etcd from it. See EtcdRecoverAction and the docs site: operate/day-2/restore-etcd.
nodeRefrequiredobjectNodeRef names the control-plane TalosNode (os.platform-kit.org) etcd is restored on.
namerequiredstringThe name of the object.
sha256requiredstringSHA256 pins the plaintext snapshot (sha256:<hex>) the approver approved: the EtcdSnapshot's record must still say so, and the upload must name it.Pattern: ^sha256:[a-f0-9]{64}$
snapshotRefrequiredobjectSnapshotRef names the EtcdSnapshot (os.platform-kit.org) to restore.
namerequiredstringThe name of the object.
timeoutSecondsinteger (int32)TimeoutSeconds bounds the step, the wait for the upload included, counted from the previous step's end (or the approval).Default: 7200Bounds: 300 to 86400
etcdRemoveMemberobjectEtcdRemoveMember removes one etcd member by its ID, asked through a healthy control-plane peer: the path for a member whose node can no longer leave by itself (wiped, dead, unreachable).
hostnamestringHostname is the member's hostname as etcd listed it at proposal, for the approver.
memberIdrequiredstringMemberID is the etcd member ID in hex, as etcd lists it, fixed at proposal: the executor removes exactly this member, never "whatever carries that hostname now", which after a rejoin is the new member.Pattern: ^[0-9a-f]{1,16}$
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) whose member is removed: provenance for the approver, and how the executor finds the cluster and a peer to ask.
namerequiredstringThe name of the object.
flashFirmwareobjectFlashFirmware pushes a firmware image to the management controller and waits for proof that it took: the controller rebooting, and the expected version reading back afterwards. A reported success is not believed on its own.
imagerequiredstringImage is the digest-pinned OCI reference to fetch and push (the same shape as FirmwareProfile.spec.manager.image).Pattern: @sha256:[a-f0-9]{64}$
versionrequiredstringVersion is the version expected to read back after the flash — the convergence goal: a manager already serving it makes this step a no-op.Bounds: at least 1 characters
insertMediaobjectInsertMedia mounts an image URL on a virtual-media slot, dispatching the dialect the endpoint advertises (standard InsertMedia vs OEM VmmControl).
  • Rule: exactly one of imageUrl and bootAssetRef
  • Rule: imageUrl needs an https:// URL and a digest (sha256:<hex>): the operator downloads the image, checks the digest and serves it from its media service; or mount a BootAsset
bootAssetRefobjectBootAssetRef names the BootAsset (os.platform-kit.org) to mount.
namerequiredstringThe name of the object.
digeststringDigest pins the artifact bytes (sha256:<hex>) the approver saw: an artifact rebuilt since the proposal fails the step instead of mounting content nobody approved. With a digest the asset need not be Ready: the artifact approved is mounted while a newer build runs, and an asset that names no artifact yet makes the step wait. Without a digest the step pins the artifact the asset names when the step runs. Required with imageUrl: it is the image's sha256.Pattern: ^sha256:[a-f0-9]{64}$
imageUrlstringImageURL is an image to mount that no BootAsset describes, such as a site's own rescue image. It must be https:// and come with Digest. The operator downloads it when the step runs, over TLS it verifies (the system CAs and the manager's --registry-ca), refuses bytes with another digest, and serves the image from its media service. The BMC does not fetch the URL itself.Bounds: at most 2048 characters
mediaIdrequiredstringMediaID is the virtual-media slot ("CD", "USBStick", …).
powerCycleobjectPowerCycle restarts the system: off, observed off, on, observed on — or just on when it was off at the baseline. Each half converges on the reported power state, which every vendor serves, so a resumed operation never cycles a machine twice (the iBMC serves no reset time to tell).
powerOffobjectPowerOff turns the system off and waits until it reports off. With gracefulTimeoutSeconds it first asks the OS to shut down, and forces the machine off only if it is still on when that time has passed.
gracefulTimeoutSecondsinteger (int32)GracefulTimeoutSeconds, when set, makes the step ask the OS to shut down first (Redfish GracefulShutdown, the same as a short press of the power button or `ipmitool chassis power soft`), wait this long for the machine to report off, and only then force it off. Unset or 0 forces the machine off at once. A BMC that refuses a graceful shutdown is forced at once too.Bounds: 0 to 3600
setBootOverrideobjectSetBootOverride sets the source the machine boots from next. The target must be one the endpoint actually offers — machines disagree about what they call a virtual CD, so the value is checked against what was discovered rather than assumed.
modestringMode is the firmware boot mode for the override. Omitted leaves the machine's own setting alone (some firmware rejects the property).UEFILegacy
oncebooleanOnce limits the override to the next boot (the default); false is Continuous.Default: true
targetrequiredstringTarget is the boot source (UsbCd, Cd, Pxe, …) — validated against the endpoint's discovered AllowableValues at execution, not at admission.
stageFirmwareobjectStageFirmware pushes a system firmware image (BIOS/UEFI, NIC, RAID) to the BMC to apply at the machine's next reset. Staging changes nothing that runs; a reboot later in the operation applies it, and the version the inventory reports afterwards is the proof.
imagerequiredstringImage is the digest-pinned OCI reference of the update package.Pattern: @sha256:[a-f0-9]{64}$
targetsrequired[]stringTargets are the FirmwareInventory member ids to update, fixed at proposal: the approver sees which components change.Bounds: 1 to 16 items
versionrequiredstringVersion is the version the entries report once the package applied: an entry that already reports it is not staged again.Bounds: at least 1 characters
talosApplyConfigobjectTalosApplyConfig applies a rendered machine config, the bytes pinned by digest at proposal.
configSecretRefrequiredobjectConfigSecretRef names the Secret, in the operator's namespace, that holds the rendered config.
namerequiredstringThe name of the object.
digestrequiredstringDigest pins the config bytes (sha256:<hex>) the approver saw: a Secret whose content no longer hashes to it fails the step instead of applying a config nobody approved.Pattern: ^sha256:[a-f0-9]{64}$
modestringMode is how the node takes the config: NoReboot fails when a change needs a reboot, Reboot always reboots, Staged applies at the next boot, Try applies it for tryTimeoutSeconds (when the node is healthy, the step keeps it by sending it again in NoReboot mode; otherwise the node rolls it back), Auto lets the node choose.AutoNoRebootRebootStagedTryDefault: NoReboot
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) whose config this is.
namerequiredstringThe name of the object.
tryTimeoutSecondsinteger (int32)TryTimeoutSeconds bounds Try mode; unset is the node's default.Bounds: 10 to 3600
talosRebootobjectTalosReboot asks Talos to reboot the node: services stop and filesystems unmount before the kernel restarts, unlike a BMC powerCycle, which cuts the power.
modestringMode is Default (kexec or a warm reboot) or PowerCycle (a cold start at the end, for firmware that applies only then).DefaultPowerCycleDefault: Default
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) to reboot.
namerequiredstringThe name of the object.
talosResetobjectTalosReset wipes the node through Talos, back towards maintenance mode.
  • Rule: systemPartitions do not apply to mode UserDisks
  • Rule: userDisks do not apply to mode SystemDisk
  • Rule: mode UserDisks needs userDisks: Talos wipes only the user disks a reset names
gracefulbooleanGraceful leaves etcd (on a control plane) and cordons and drains the node before wiping. A node that cannot reach its peers needs false, and its member is then removed by an etcdRemoveMember step.Default: true
modestringMode picks the disks: All (the system disk and the disks in userDisks), SystemDisk, or UserDisks (only the disks in userDisks).AllSystemDiskUserDisksDefault: All
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) to reset.
namerequiredstringThe name of the object.
rebootbooleanReboot boots the node into maintenance mode afterwards; false leaves it powered off.
systemPartitions[]stringSystemPartitions limits the wipe to these system partitions; empty wipes what mode names. STATE holds the machine config and its credentials, EPHEMERAL the pod data and etcd.STATEEPHEMERALMETABounds: at most 3 items
userDisks[]stringUserDisks names the data disks to wipe in mode All or UserDisks, by device path (/dev/sdb). Talos finds no user disk by itself: a disk that is not named keeps its data. Talos refuses a path it does not know, a read-only disk and the system disk.Bounds: at most 16 itemsPattern: ^/dev/[A-Za-z0-9._/:-]+$
talosShutdownobjectTalosShutdown asks Talos to shut the node down cleanly.
forcebooleanForce shuts down even when the node cannot cordon and drain itself first (its Kubernetes API is down).
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) to shut down.
namerequiredstringThe name of the object.
talosUpgradeobjectTalosUpgrade installs another Talos version from an installer image and reboots into it.
forcebooleanForce skips the etcd health check Talos runs before upgrading a control plane.
imagerequiredstringImage is the installer image, pinned by digest: what the approver saw is what is installed.Pattern: @sha256:[a-f0-9]{64}$
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) to upgrade.
namerequiredstringThe name of the object.
preservebooleanPreserve keeps the EPHEMERAL partition (pod data, etcd). Talos 1.8 and later always preserve it; the field is passed through for older nodes.Default: true
rebootModestringRebootMode is how the reboot into the new image ends.DefaultPowerCycleDefault: Default
stagebooleanStage writes the new image and upgrades at the next reboot, for a node whose open files would block an upgrade in place.
versionrequiredstringVersion is the Talos version expected to read back afterwards, the step's goal: a node that already reports it is not upgraded again.Pattern: ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$
uncordonobjectUncordon marks the node schedulable again. Already schedulable is success.
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org).
namerequiredstringThe name of the object.
waitEtcdHealthyobjectWaitEtcdHealthy waits, changing nothing, until the etcd cluster of the node's TalosCluster is healthy: every member answers, none reports an error or alarm, and none is a learner.
nodeRefrequiredobjectNodeRef names a control-plane TalosNode (os.platform-kit.org) of the cluster. Its own member must be listed too, as a voting member: after a join or a reboot, that is the member the wait is for.
namerequiredstringThe name of the object.
timeoutSecondsinteger (int32)TimeoutSeconds bounds the wait, counted from the previous step's end.Default: 900Bounds: 60 to 86400
waitNodeReadyobjectWaitNodeReady waits, changing nothing, until the node runs and is ready: Talos stage running with every readiness condition met, and its Kubernetes Node Ready.
nodeRefrequiredobjectNodeRef names the TalosNode (os.platform-kit.org) to wait for.
namerequiredstringThe name of the object.
timeoutSecondsinteger (int32)TimeoutSeconds bounds the wait, counted from the previous step's end.Default: 1800Bounds: 60 to 86400
versionstringVersion, when set, is also waited for: the Talos version the node must report, the proof an upgrade took.Pattern: ^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$
approvalobjectApproval is the human gate. Omitted means required — the safe default is a closed gate.Default: {"required":true}
approvedBystringApprovedBy is stamped by the approver — the ValidatingAdmissionPolicy enforces that it equals the requesting username, is empty at creation, and is write-once.
requiredbooleanRequired: this operation must be approved before it runs (from the disruption policy; explicit false only where the policy waives the gate, and admission lets only the operator or an admin create such an operation). A pointer so that EVERY client that says nothing — YAML omitting the key, a Go zero value — gets the safe default: a closed gate. Frozen: flipping it would be an approval without a name on it.Default: true
  • Rule: approval.required is frozen after creation
hostRefrequiredobjectHostRef names the Host this operation acts on.
  • Rule: hostRef is frozen after creation
namerequiredstringThe name of the object.
planHashstringPlanHash binds a proposed operation to the desired state it serves — an unchanged hash never spawns a second op (the convergence reconcilers' guard).
proposedByrequiredstringProposedBy is the username that created the operation. Admission checks it against the creating request, so it cannot name someone else. Whether the same person may also approve it is a site setting (selfApproval in the ConfigMap pk-metal/hostoperation-approval, default Allowed).Bounds: at least 1 characters
reasonstringReason names the desired-state gate this operation serves (BiosConvergence, FirmwareConvergence, …); empty for a human-requested op. It becomes the Approval(<reason>) domain on the Host's blockedOn — hence the condition-reason shape.Bounds: at most 128 charactersPattern: ^[A-Za-z][A-Za-z0-9]*$
requestedBy[]stringRequestedBy names the people whose change made the operator propose this operation: the metal.platform-kit.org/requested-by annotations of the objects behind it (the claim, the node, the Host, the profiles). It is frozen after creation. Where the site forbids self-approval, none of them may approve the operation. Empty for an operation a person proposed; that person is its proposer.Bounds: at most 32 items
rolloutRefobjectRolloutRef names the rollout (os.platform-kit.org TalosRollout) this operation is one node's part of, and the plan it was created for. The executor refuses an operation whose rollout is gone, not approved, or approved for another planHash: an operation the rollout's approval covers carries no approval of its own, so the binding is what makes that approval mean this operation. Empty for an operation approved on its own.
namerequiredstringName is the TalosRollout's name.Bounds: at least 1 characters
planHashrequiredstringPlanHash is the rollout's planHash when this operation was created.Bounds: at least 1 characters
ttlSecondsAfterFinishedinteger (int32)TTLSecondsAfterFinished garbage-collects a succeeded operation Job-style, after this time or the site's retention (key retention in the ConfigMap hostoperation-approval), whichever is longer. A failed one stays until a person retries or deletes it: it is the record they decide on. Unset keeps it forever (human-requested ops stay as their own record); convergence proposals set it — the plan memory on the proposing object, not the operation's existence, is what keeps an unchanged planHash from spawning again. It is frozen after creation: an approver must not give a record that is meant to stay a time to go.Bounds: at least 0
FieldTypeDescription
baselineobjectBaseline is captured (and persisted) before the first mutating call.
capturedAtstring (date-time)CapturedAt is when the baseline was taken — the start of execution, which bounds how long a power transition may take to show.
lastResetTimestring (date-time)LastResetTime as observed before any action ran. Micro precision: the sim resets faster than a second, and second-precision would blind the advance predicate.
powerStatestring
blockedOnstringBlockedOn is derived — why the operation isn't advancing (AwaitingApproval, OperationQueued).
conditions[]objectConditions are the truth — the only thing reconcilers branch on.
cordonedNodestringCordonedNode is the Kubernetes Node this operation made unschedulable (a cordon or drain step that found it schedulable). An abort makes it schedulable again; a node a person had cordoned before is left as it was.
observedResetTimestring (date-time)ObservedResetTime is the reset-time observation after the last step — the proof the reset happened, and what marks a Host reset-time advance as explained rather than Drifted.
offObservedstring (date-time)OffObserved is when the executor saw the machine report off during a power cycle — the first half of the cycle, recorded so that a resumed operation finishes the cycle instead of starting a second one.
phasestringPhase summarizes the conditions below for people and for kubectl columns. It is a summary, not the contract: automation should read conditions.ProposedAwaitingApprovalRunningSucceededFailedAborted
shutdownRequestedstring (date-time)ShutdownRequested is when the executor asked the OS to shut down for a graceful powerOff. The step forces the machine off once the graceful window, counted from here, has passed; recording it means a resumed operation neither asks again nor restarts the window.
steps[]objectSteps records each action's outcome in execution order, written as each step reaches its goal. A resumed operation continues after the last recorded step: a goal that a later step consumed (a Once boot override used up by the boot that followed) is never re-armed.
actionrequiredstringAction is the union key that ran (powerCycle, insertMedia, …), or "abort" for the record of an abort and what it undid.
finishedAtstring (date-time)FinishedAt is when the step reached its goal (or failed).
messagestring
phaserequiredstringSucceededFailedAborted
talosStepobjectTalosStep is the progress of the Talos step in flight that restarts or wipes the node (talosReboot, talosUpgrade, talosApplyConfig, talosReset, talosShutdown): the node's boot time before it acted, and when the request was accepted. A resumed operation waits for the boot time to move on instead of asking a second time.
bootTimestring (date-time)BootTime is the node's boot time before the step acted. The step's restart shows as a later boot time.
modestringMode is how the node said it applies a config (talosApplyConfig): reboot, no-reboot, staged or try.
requestedAtstring (date-time)RequestedAt is when the node accepted the request. It stays unset while no answer came back, and the step then asks again.
steprequiredinteger (int32)Step is the index in spec.actions this progress belongs to.Bounds: at least 0
uploadAcceptedobjectUploadAccepted records that a firmware step (flashFirmware, stageFirmware) sent its image to the BMC. It is written before the upload, so a resumed operation never sends the image a second time: it only waits for the version to read back. A second upload to a manager that is still busy with the first can wedge it.
managerResetTimestring (date-time)ManagerResetTime is the manager's last reset time before a flash, if the manager serves one: the flash is done only after a later reset.
sentAtrequiredstring (date-time)SentAt is when the executor started the upload.
steprequiredinteger (int32)Step is the index of the action in spec.actions that uploaded.Bounds: at least 0
targets[]stringTargets are the inventory entries a stageFirmware step sent its image for, in order.

Columns of kubectl get hostoperations (the columns marked wide show only with -o wide):

ColumnValue
NAME.metadata.name
HOST.spec.hostRef.name
PHASE.status.phase
REASON.spec.reason
PROPOSEDwide.spec.proposedBy
APPROVED.spec.approval.approvedBy
BLOCKEDwide.status.blockedOn
AGE.metadata.creationTimestamp
Condition Reason Meaning
Approved AwaitingApproval A person must approve. The message gives the command.
Approved Approved A person approved, or the rollout approval covers it.
Approved ApprovalNotRequired required: false.
Approved WaiverRefused False. The operator proposed it with required: false, but it is not a rollout step, an install of an Automatic claim or a release.
Executed Executing Steps run. The message names the current step.
Executed OperationQueued, HostNotFound, HostInMaintenance, OutsideMaintenanceWindow, SelfDisruption, ClusterDisruption, NoReachablePath A gate holds the operation. The phase shows Proposed.
Executed StepsSucceeded True. All steps reached their goal.
Executed StepFailed, RolloutRefused, WaiverRefused, HostNotClaimed False. The operation failed.
Executed Aborted False. A person stopped it.

A finished operation with spec.ttlSecondsAfterFinished goes away when the time is over and the site retention ended, but only if it succeeded. See Retention. A failed operation stays until a person acts.

A reboot of a worker, as pk-metal reboot proposes it:

apiVersion: metal.platform-kit.org/v1alpha1
kind: HostOperation
metadata:
name: reboot-w-1-7f3c2a
namespace: pk-metal
spec:
hostRef: { name: sim-0004 }
proposedBy: alice
actions:
- cordon: { nodeRef: { name: w-1 } }
- drain: { nodeRef: { name: w-1 }, timeoutSeconds: 900 }
- talosReboot: { nodeRef: { name: w-1 } }
- waitNodeReady: { nodeRef: { name: w-1 } }
- uncordon: { nodeRef: { name: w-1 } }
Terminal window
$ kubectl get hostoperations -n pk-metal -o wide
NAME HOST PHASE REASON PROPOSED APPROVED BLOCKED AGE
reboot-w-1-7f3c2a sim-0004 AwaitingApproval alice 1m