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.
At a glance
Section titled “At a glance”- Group and version
metal.platform-kit.org/v1alpha1- Scope
- Namespaced. The operator makes its operations in the
pk-metalnamespace. - 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,rolloutRefandapproval.required.- Source
- hostoperation_types.go
How it connects
Section titled “How it connects”These controllers propose operations:
- The HostClaim controller proposes the install when a HostClaim binds a Host.
- The Convergence controller proposes BIOS and firmware changes from a BiosProfile or a FirmwareProfile.
- The TalosRollout controller makes one operation for each node of an approved TalosRollout.
- Commands such as pk-metal reboot, pk-metal replace and pk-metal restore propose day-2 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.
Lifecycle
Section titled “Lifecycle”- A controller or a person creates the operation. The phase changes from Proposed to AwaitingApproval.
- A person approves it. The gates start. The site setting
selfApprovaltells if the proposer can approve, see Admission policies. - A gate can hold the operation. The phase shows Proposed again, and
blockedOngives the reason. - All gates open. The operator records a baseline and the phase is Running.
- Each action runs in order. When all actions reach their goal, the phase changes to Succeeded.
- An action fails. The phase changes to Failed. The operator does not retry it.
- 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
Propose
A controller or a person creates the HostOperation. spec.actions lists each action in order. Nothing changes on the machine.
kubectl get hostoperations -APropose. A controller or a person creates the HostOperation. spec.actions lists each action in order. Nothing changes on the machine.
kubectl get hostoperations -AApprove. 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-1a2b3cAbort 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.
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.
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>"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.
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 → uncordonFinish. 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>
Approval
Section titled “Approval”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:
- Nobody can create an operation that is already approved.
spec.proposedBymust be the user who creates the operation.- Only the operator or an admin can create an operation with
required: false. approvedBymust be the user who approves.- The proposer cannot approve the proposal.
- 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.
Rollout operations
Section titled “Rollout operations”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
planHashas 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.
Gates before the start
Section titled “Gates before the start”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.
Annotations
Section titled “Annotations”Set these annotations on the HostOperation. The value tells who asked and why.
metal.platform-kit.org/abortStops 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/retryOn 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,
retrydeletes the failed operation and the controller proposes it again.metal.platform-kit.org/override-cluster-guardLets 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.
How the steps run
Section titled “How the steps run”- 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.stepswhen 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
powerCycleorpowerOff. - 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
| Field | Type | Description |
|---|---|---|
actionsrequired | []object | Actions 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.
|
applyBios | object | ApplyBios 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. |
attributesrequired | map[string]any | Attributes 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. |
settingsRef | object | SettingsRef names the BiosSettings the attributes came from — provenance only: the executor never reads it, so an edit after approval cannot change what runs. |
namerequired | string | The name of the object. |
awaitCheckIn | object | AwaitCheckIn 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. |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) whose check-in ends the wait: MachineReachable=True over the authenticated machine API, or Ready=True. |
namerequired | string | The name of the object. |
timeoutSeconds | integer (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. |
cordon | object | Cordon marks the node's Kubernetes Node unschedulable. Already cordoned is success. |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org); its hostname is the Kubernetes Node's name. |
namerequired | string | The name of the object. |
deleteKubernetesNode | object | DeleteKubernetesNode deletes the node's Node object from its cluster's Kubernetes API, the last trace of a removed node there. Already gone is success. |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org); its name is the Kubernetes Node's name, and its cluster says which Kubernetes API to ask. |
namerequired | string | The name of the object. |
drain | object | Drain 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. |
deleteEmptyDirData | boolean | DeleteEmptyDirData lets the drain evict pods with emptyDir volumes, whose data is lost. Without it such a pod fails the step. |
gracePeriodSeconds | integer (int32) | GracePeriodSeconds overrides each pod's termination grace period; unset keeps the pod's own. |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) to drain. |
namerequired | string | The name of the object. |
timeoutSeconds | integer (int32) | TimeoutSeconds bounds the whole drain, budget waits included. Running out fails the step and leaves the node cordoned. |
ejectMedia | object | EjectMedia unmounts a virtual-media slot. |
mediaIdrequired | string | MediaID is the virtual-media slot to empty. |
etcdForfeitLeadership | object | EtcdForfeitLeadership 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. |
nodeRefrequired | object | NodeRef names the control-plane TalosNode (os.platform-kit.org) whose member gives up leadership. |
namerequired | string | The name of the object. |
etcdLeave | object | EtcdLeave makes the node's etcd member leave the cluster, asked on the node itself: the orderly removal of a control plane that still answers. |
nodeRefrequired | object | NodeRef names the control-plane TalosNode (os.platform-kit.org) that leaves. |
namerequired | string | The name of the object. |
etcdRecover | object | EtcdRecover 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. |
nodeRefrequired | object | NodeRef names the control-plane TalosNode (os.platform-kit.org) etcd is restored on. |
namerequired | string | The name of the object. |
sha256required | string | SHA256 pins the plaintext snapshot (sha256:<hex>) the approver approved: the EtcdSnapshot's record must still say so, and the upload must name it. |
snapshotRefrequired | object | SnapshotRef names the EtcdSnapshot (os.platform-kit.org) to restore. |
namerequired | string | The name of the object. |
timeoutSeconds | integer (int32) | TimeoutSeconds bounds the step, the wait for the upload included, counted from the previous step's end (or the approval). |
etcdRemoveMember | object | EtcdRemoveMember 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). |
hostname | string | Hostname is the member's hostname as etcd listed it at proposal, for the approver. |
memberIdrequired | string | MemberID 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. |
nodeRefrequired | object | NodeRef 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. |
namerequired | string | The name of the object. |
flashFirmware | object | FlashFirmware 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. |
imagerequired | string | Image is the digest-pinned OCI reference to fetch and push (the same shape as FirmwareProfile.spec.manager.image). |
versionrequired | string | Version is the version expected to read back after the flash — the convergence goal: a manager already serving it makes this step a no-op. |
insertMedia | object | InsertMedia mounts an image URL on a virtual-media slot, dispatching the dialect the endpoint advertises (standard InsertMedia vs OEM VmmControl).
|
bootAssetRef | object | BootAssetRef names the BootAsset (os.platform-kit.org) to mount. |
namerequired | string | The name of the object. |
digest | string | Digest 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. |
imageUrl | string | ImageURL 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. |
mediaIdrequired | string | MediaID is the virtual-media slot ("CD", "USBStick", …). |
powerCycle | object | PowerCycle 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). |
powerOff | object | PowerOff 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. |
gracefulTimeoutSeconds | integer (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. |
setBootOverride | object | SetBootOverride 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. |
mode | string | Mode is the firmware boot mode for the override. Omitted leaves the machine's own setting alone (some firmware rejects the property).UEFILegacy |
once | boolean | Once limits the override to the next boot (the default); false is Continuous. |
targetrequired | string | Target is the boot source (UsbCd, Cd, Pxe, …) — validated against the endpoint's discovered AllowableValues at execution, not at admission. |
stageFirmware | object | StageFirmware 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. |
imagerequired | string | Image is the digest-pinned OCI reference of the update package. |
targetsrequired | []string | Targets are the FirmwareInventory member ids to update, fixed at proposal: the approver sees which components change. |
versionrequired | string | Version is the version the entries report once the package applied: an entry that already reports it is not staged again. |
talosApplyConfig | object | TalosApplyConfig applies a rendered machine config, the bytes pinned by digest at proposal. |
configSecretRefrequired | object | ConfigSecretRef names the Secret, in the operator's namespace, that holds the rendered config. |
namerequired | string | The name of the object. |
digestrequired | string | Digest 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. |
mode | string | Mode 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.AutoNoRebootRebootStagedTry |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) whose config this is. |
namerequired | string | The name of the object. |
tryTimeoutSeconds | integer (int32) | TryTimeoutSeconds bounds Try mode; unset is the node's default. |
talosReboot | object | TalosReboot asks Talos to reboot the node: services stop and filesystems unmount before the kernel restarts, unlike a BMC powerCycle, which cuts the power. |
mode | string | Mode is Default (kexec or a warm reboot) or PowerCycle (a cold start at the end, for firmware that applies only then).DefaultPowerCycle |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) to reboot. |
namerequired | string | The name of the object. |
talosReset | object | TalosReset wipes the node through Talos, back towards maintenance mode.
|
graceful | boolean | Graceful 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. |
mode | string | Mode picks the disks: All (the system disk and the disks in userDisks), SystemDisk, or UserDisks (only the disks in userDisks).AllSystemDiskUserDisks |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) to reset. |
namerequired | string | The name of the object. |
reboot | boolean | Reboot boots the node into maintenance mode afterwards; false leaves it powered off. |
systemPartitions | []string | SystemPartitions 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.STATEEPHEMERALMETA |
userDisks | []string | UserDisks 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. |
talosShutdown | object | TalosShutdown asks Talos to shut the node down cleanly. |
force | boolean | Force shuts down even when the node cannot cordon and drain itself first (its Kubernetes API is down). |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) to shut down. |
namerequired | string | The name of the object. |
talosUpgrade | object | TalosUpgrade installs another Talos version from an installer image and reboots into it. |
force | boolean | Force skips the etcd health check Talos runs before upgrading a control plane. |
imagerequired | string | Image is the installer image, pinned by digest: what the approver saw is what is installed. |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) to upgrade. |
namerequired | string | The name of the object. |
preserve | boolean | Preserve keeps the EPHEMERAL partition (pod data, etcd). Talos 1.8 and later always preserve it; the field is passed through for older nodes. |
rebootMode | string | RebootMode is how the reboot into the new image ends.DefaultPowerCycle |
stage | boolean | Stage writes the new image and upgrades at the next reboot, for a node whose open files would block an upgrade in place. |
versionrequired | string | Version is the Talos version expected to read back afterwards, the step's goal: a node that already reports it is not upgraded again. |
uncordon | object | Uncordon marks the node schedulable again. Already schedulable is success. |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org). |
namerequired | string | The name of the object. |
waitEtcdHealthy | object | WaitEtcdHealthy 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. |
nodeRefrequired | object | NodeRef 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. |
namerequired | string | The name of the object. |
timeoutSeconds | integer (int32) | TimeoutSeconds bounds the wait, counted from the previous step's end. |
waitNodeReady | object | WaitNodeReady waits, changing nothing, until the node runs and is ready: Talos stage running with every readiness condition met, and its Kubernetes Node Ready. |
nodeRefrequired | object | NodeRef names the TalosNode (os.platform-kit.org) to wait for. |
namerequired | string | The name of the object. |
timeoutSeconds | integer (int32) | TimeoutSeconds bounds the wait, counted from the previous step's end. |
version | string | Version, when set, is also waited for: the Talos version the node must report, the proof an upgrade took. |
approval | object | Approval is the human gate. Omitted means required — the safe default is a closed gate. |
approvedBy | string | ApprovedBy is stamped by the approver — the ValidatingAdmissionPolicy enforces that it equals the requesting username, is empty at creation, and is write-once. |
required | boolean | Required: 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.
|
hostRefrequired | object | HostRef names the Host this operation acts on.
|
namerequired | string | The name of the object. |
planHash | string | PlanHash binds a proposed operation to the desired state it serves — an unchanged hash never spawns a second op (the convergence reconcilers' guard). |
proposedByrequired | string | ProposedBy 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). |
reason | string | Reason 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. |
requestedBy | []string | RequestedBy 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. |
rolloutRef | object | RolloutRef 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. |
namerequired | string | Name is the TalosRollout's name. |
planHashrequired | string | PlanHash is the rollout's planHash when this operation was created. |
ttlSecondsAfterFinished | integer (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. |
Status
Section titled “Status”| Field | Type | Description |
|---|---|---|
baseline | object | Baseline is captured (and persisted) before the first mutating call. |
capturedAt | string (date-time) | CapturedAt is when the baseline was taken — the start of execution, which bounds how long a power transition may take to show. |
lastResetTime | string (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. |
powerState | string | |
blockedOn | string | BlockedOn is derived — why the operation isn't advancing (AwaitingApproval, OperationQueued). |
conditions | []object | Conditions are the truth — the only thing reconcilers branch on. |
cordonedNode | string | CordonedNode 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. |
observedResetTime | string (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. |
offObserved | string (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. |
phase | string | Phase summarizes the conditions below for people and for kubectl columns. It is a summary, not the contract: automation should read conditions.ProposedAwaitingApprovalRunningSucceededFailedAborted |
shutdownRequested | string (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 | []object | Steps 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. |
actionrequired | string | Action is the union key that ran (powerCycle, insertMedia, …), or "abort" for the record of an abort and what it undid. |
finishedAt | string (date-time) | FinishedAt is when the step reached its goal (or failed). |
message | string | |
phaserequired | string | SucceededFailedAborted |
talosStep | object | TalosStep 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. |
bootTime | string (date-time) | BootTime is the node's boot time before the step acted. The step's restart shows as a later boot time. |
mode | string | Mode is how the node said it applies a config (talosApplyConfig): reboot, no-reboot, staged or try. |
requestedAt | string (date-time) | RequestedAt is when the node accepted the request. It stays unset while no answer came back, and the step then asks again. |
steprequired | integer (int32) | Step is the index in spec.actions this progress belongs to. |
uploadAccepted | object | UploadAccepted 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. |
managerResetTime | string (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. |
sentAtrequired | string (date-time) | SentAt is when the executor started the upload. |
steprequired | integer (int32) | Step is the index of the action in spec.actions that uploaded. |
targets | []string | Targets 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):
| Column | Value |
|---|---|
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 |
Conditions
Section titled “Conditions”| 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.
Example
Section titled “Example”A reboot of a worker, as pk-metal reboot proposes it:
apiVersion: metal.platform-kit.org/v1alpha1kind: HostOperationmetadata: name: reboot-w-1-7f3c2a namespace: pk-metalspec: 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 } }$ kubectl get hostoperations -n pk-metal -o wideNAME HOST PHASE REASON PROPOSED APPROVED BLOCKED AGEreboot-w-1-7f3c2a sim-0004 AwaitingApproval alice 1m