Skip to content

Catalog · metadata

Labels, annotations and finalizers

The operator uses keys in metadata to take commands from you and to keep its own records. This page lists each key. The long text of each entry comes from the Go source.

These annotations are commands. Most of them have a pk-metal command that sets the annotation for you.

Annotation On Effect Set it with
hold HostClaim The operator proposes nothing for the claim. pk-metal hold
maintenance Host The operator starts nothing on the machine. kubectl annotate
ignore-window HostOperation The operation starts when no window is open. kubectl annotate, with your name
abort HostOperation The operation stops before its next step. pk-metal abort, with your name
retry HostOperation The operator proposes a failed BIOS or firmware plan again. pk-metal retry
reinstall HostClaim The operator proposes a wipe and a new install on the same machine. pk-metal reinstall
wipe Host The operator proposes a wipe of a machine that it could not reset. pk-metal wipe
ack-etcd-risk HostClaim, TalosNode You accept a risk for etcd when a control plane goes. --ack-etcd-risk
allow-self-disruption Host The operator can reboot the machine that it runs on. kubectl annotate, with your name
wipe-waived Host A person removed disk-not-wiped without a wipe. kubectl annotate, with your name
override-cluster-guard HostOperation The operation can stop a control plane when etcd is not healthy. kubectl annotate, with your name
approve-tls-key ManagementEndpoint The operator pins this TLS key of the BMC when the BMC shows it. See Trust the BMC certificate. kubectl annotate
resume TalosRollout The rollout continues after the pause on the first node. pk-metal rollout
restore-pending TalosCluster The operator does not bootstrap etcd, because you restore it. kubectl annotate
requested-by TalosCluster, TalosNode, HostClaim, Host, TalosRollout, profiles, patch ConfigMaps Names you as the person who asked for the change that the operator proposes. The requested-by policy needs it. The pk-metal commands, or kubectl annotate with your username

In the table, each name is without its prefix metal.platform-kit.org/ or os.platform-kit.org/.

Put the label patch on each ConfigMap that holds a Talos config patch. The operator reads no patch from a ConfigMap without it.

The value of metal.platform-kit.org/ignore-window, metal.platform-kit.org/override-cluster-guard and metal.platform-kit.org/ack-etcd-risk is <username>: <reason>. The username is your own username in the API server. The guard-lift policy refuses each other value, and an empty reason. For example: metal.platform-kit.org/ignore-window="alice: CVE fix, agreed with on-call". Get your username with kubectl auth whoami. pk-metal writes the value for you with --ack-etcd-risk.

You can always remove the annotation. That puts the guard back. A value from before the policy, or an empty value, stays until somebody changes it. An empty value does not count: the operator ignores the annotation, and the guard stays. See Audit trail.

A holder of patch on HostOperations can set these annotations. The approver role has patch. So a person who can approve an operation can also lift these guards on it.

The operator puts these labels on each Host and ManagementEndpoint. Use them in the selector of a profile or of a MaintenanceWindow.

KeyTypeOnValue
metal.platform-kit.org/vendorlabelHost, ManagementEndpointThe vendor that the BMC reports, for example Huawei. labels.go
metal.platform-kit.org/modellabelHost, ManagementEndpointThe model that the BMC reports. labels.go
metal.platform-kit.org/vlanlabelManagementEndpointThe VLAN from the Asset. The label is absent when the Asset has no VLAN. labels.go
metal.platform-kit.org/assetlabelHostThe name of the Asset through which the operator found the machine. labels.go

A Host also gets the labels from spec.labels of the claim that holds it. These keys have no prefix, for example role. The operator removes them when the claim releases the Host.

EndpointProfile
Selects ManagementEndpoints. Use vendor, model and vlan.
BiosProfile, FirmwareProfile
Select Hosts. Use vendor, model and the labels of the claim.
MaintenanceWindow
Selects Hosts with spec.hostSelector.

A value is the text from the BMC with each character that a label cannot have changed to a hyphen. The model 2288H V5 becomes 2288H-V5.

The mark "API" means that the key is a constant of the API package. The mark "internal" means that one controller uses the key for its own records.

metal.platform-kit.org/abortAPI

The annotation on a HostOperation asks the executor to stop it. The value is "<username>: <reason>": who asked and why. Admission accepts no other form, and only the caller's own username (config/policy/guard-lift.yaml); pk-metal abort writes it. An operation that has not started ends at once. A running one stops before its next step: a step that already acted on the machine (a reboot asked for, a power cycle half done) is finished first, then the executor undoes what the operation left behind (it ejects the media it mounted, clears the boot override it set, and makes schedulable again the node it cordoned) and the operation ends as Aborted. Deleting the operation also stops it, but undoes nothing.

metal.platform-kit.org/ack-etcd-riskAPI

The annotation on a HostClaim or a TalosNode lets the removal or reinstall of a control plane continue, although etcd then has an even number of voting members, no healthy majority, or no member. Without it, the operator refuses such a removal and says why. The value is "<username>: <reason>": who accepted the risk and why. Admission accepts no other form, and only the caller's own username (config/policy/guard-lift.yaml). pk-metal scale sets it on the removals of a plan that passes through an even count, and names its caller.

metal.platform-kit.org/allow-self-disruptionAPI

The annotation on a Host lets the operator reboot or power off a machine that it needs itself. This is the machine that it runs on, or a control plane of the cluster that it runs in. Without it, the operator proposes no install, release or BIOS change for such a machine. It also starts no power action on it, because the operator would stop itself in the middle of the work. With the annotation, the operator still takes down only one control plane at a time. It does so only while the other control planes keep the etcd majority. The value is "<username>: <reason>": who allowed it and why. Admission accepts no other form, and only the caller's own username (config/policy/guard-lift.yaml). Remove the annotation when the work is done:

kubectl annotate host <host> metal.platform-kit.org/allow-self-disruption="<you>: <reason>"
kubectl annotate host <host> metal.platform-kit.org/allow-self-disruption-

The safer way is to move the operator to another cluster first (pk-metal pivot); the machine is then an ordinary one.

metal.platform-kit.org/approve-tls-keyAPI

The annotation on a ManagementEndpoint approves a new TLS key of the BMC: the value is the key as the Reachable condition names it ("sha256:<hex>"). The operator pins that key when the BMC presents it, and then removes the annotation. A key that is not presented is never pinned.

metal.platform-kit.org/disk-not-wipedAPI

The annotation on a Host says that the machine can still hold an installed Talos node, with the credentials of its cluster. On a control plane, the disk can also hold etcd data. The operator writes it when it releases a machine that it could not reset through Talos. The node did not answer, or the executor could not run a reset. Only an approved wipe removes it. While it is set, the operator proposes no install of another node on the machine. It also proposes no BIOS or firmware change that would power the machine on. The value is <cluster>/<node>, the node that can still be on the disk.

pk-metal wipe <host>
metal.platform-kit.org/etcd-snapshot-uploadedAPI

The annotation on a HostOperation with an etcdRecover step records that a person uploaded the snapshot to the node. Its value is "<username>: sha256:<hex>": who uploaded, and the sha256 of the plaintext that pk-metal restore upload sent. Admission accepts no other form, and only the caller's own username (config/policy/guard-lift.yaml). The command first checked those bytes against the record of the EtcdSnapshot. The step waits for it, and only then asks Talos to start etcd from the upload. It is the uploader's statement, not proof; Talos checks etcd's own integrity hash of the upload when it recovers.

metal.platform-kit.org/holdAPI

The annotation on a HostClaim stops the operator from proposing anything for it: no install, no release. Proposals still waiting for approval are withdrawn. The value is an optional reason, shown in the claim's Provisioned condition. An operation already approved and running is not stopped by it. Remove the annotation to go on.

metal.platform-kit.org/ignore-windowAPI

The annotation on a HostOperation lets it start outside every maintenance window. It is for an urgent case that a person decides on: a security fix, or a machine that is down already. The value is "<username>: <reason>": who lifted the window and why. Admission accepts no other form, and only the caller's own username (config/policy/guard-lift.yaml). It shows in the record of the operation.

metal.platform-kit.org/maintenanceAPI

The annotation on a Host takes the machine away from the operator, as an offline node in a cluster manager. The operator proposes nothing for it: no install, no release, no BIOS or firmware change. It starts no operation on it that has not started yet. An operation already running finishes. The value is the reason, shown in the Host's Maintenance condition and in the messages of claims on it. Remove the annotation to give the machine back:

kubectl annotate host <host> metal.platform-kit.org/maintenance="replacing DIMM B2"
kubectl annotate host <host> metal.platform-kit.org/maintenance-
metal.platform-kit.org/override-cluster-guardAPI

The annotation on a HostOperation lets it take a control plane down although etcd is not fully healthy without it: the way out when etcd is already broken and the reboot is the repair, or for a cluster with a single control plane. The value is "<username>: <reason>": who lifted the guard and why. Admission accepts no other form, and only the caller's own username (config/policy/guard-lift.yaml). It does not lift the one-control-plane-at-a-time rule, and it does not lift self-protection.

metal.platform-kit.org/reinstallAPI

The annotation on a HostClaim asks the operator to wipe and reinstall the node of the claim on the same machine. Use it for a damaged install or a replaced disk. The value is the claim's status.handOff.at (RFC 3339). Thus it names the install that was there when a person asked, and it works one time. The reinstall writes a new hand-off record. The annotation then names an install that is gone, and asks for nothing. pk-metal reinstall sets it.

metal.platform-kit.org/release-power-offinternal

The annotation on a Host names the UID of the claim whose release powers the machine off. The executor writes it when a boot of the claim starts, before its first BMC write; the release writes it when it decides. It keeps that decision after the records it was read from are gone: the boot operations are deleted to stop the boot or by pk-metal retry, and the release operation itself can be deleted by pk-metal retry or by its TTL. Without it, the next pass would find no boot and hand back a machine that is still mid-boot. releaseAll removes it when the host is unbound.

metal.platform-kit.org/requested-byAPI

The annotation on an object whose change makes the operator propose work names the person who last changed what the object asks for. Its value is a username. Admission (config/policy/requested-by.yaml) accepts a request that changes the intent of such an object only if the request also sets this annotation to the username of the request, and a request that changes the annotation only if it names the requester. So the value always names the last person who changed the intent, or a person who took the change on as theirs.

The operator copies the names of the objects behind a proposal into the proposal's spec.requestedBy. Where the site forbids self-approval, none of them may approve it: the person who bumps a cluster's version, marks a Host for a wipe or a claim for a reinstall cannot approve the change that follows, although the operator proposed it.

The intent of each kind, and the kinds themselves, are listed in the policy. pk-metal sets the annotation for its caller; a GitOps controller sets its own service account name in the manifests it applies.

metal.platform-kit.org/retryAPI

The annotation on a failed convergence proposal (spec.reason BiosConvergence or FirmwareConvergence) asks the operator for the same plan again: it deletes the failed operation and proposes a new one, which waits for approval like the first. pk-metal retry sets it. Deleting such an operation instead is not a retry: deletion is how a proposal is refused.

metal.platform-kit.org/wipe-waivedAPI

The annotation on a Host records who removed metal.platform-kit.org/disk-not-wiped without a wipe, and why: "<username>: <reason>". Admission refuses the removal of the mark by a person unless the same request sets this annotation in that form, with the person's own username (config/policy/guard-lift.yaml). The operator removes it when it marks the machine again or wipes it, and the audit trail names it when an install starts on the machine.

kubectl annotate host <host> metal.platform-kit.org/disk-not-wiped- \
metal.platform-kit.org/wipe-waived="<you>: <reason>"
os.platform-kit.org/restore-pendingAPI

The annotation on a TalosCluster says that its etcd is to be restored from a snapshot, not started empty: the operator does not bootstrap the cluster while it is set, even though it was never seen bootstrapped. Set it on a TalosCluster re-created to restore a lost cluster (docs site: operate/day-2/restore-etcd, "Majority lost"). Once the restored etcd is observed, status.bootstrappedAt takes over and the annotation has no further effect.

os.platform-kit.org/resumeAPI

The annotation on a TalosRollout lets it go on past the pause after its first node. Its value must be the rollout's planHash: a resume given for one plan does not carry over to another. `pk-metal rollout resume` sets it.

os.platform-kit.org/patchAPI

The label marks a ConfigMap that holds Talos config patches. The operator reads a patch only from a ConfigMap with this label (any value), and admission asks who changed such a ConfigMap (metal.platform-kit.org/requested-by, config/policy/requested-by.yaml), so that a change of a patch is attributed like a change of the cluster.

A finalizer keeps an object until the operator completes its work. Do not remove a finalizer by hand.

os.platform-kit.org/memberinternal

The finalizer holds a deleted TalosNode until its node is out of its cluster. Without it a TalosNode could vanish while its machine still runs, with nothing left to say which cluster that machine is a member of, and the steps that take it out (drain, etcd leave, reset) would have no node to act on.

The generated list does not have these keys, because the source makes each of them from a prefix and a name.

KeyTypeOnValue
metal.platform-kit.org/managed-labelsannotationHost, ManagementEndpointThe list of the label keys that the operator manages on the object. The operator does not change a label that is not in the list. labels.go
metal.platform-kit.org/rotated-atannotationSecret (managed BMC credentials)The time when the operator made the password. The operator compares it with maxAge of the EndpointProfile. endpointprofile_controller.go
metal.platform-kit.org/plan-hashannotationSecret (BMC identity in progress)The hash of the identity that the key and the certificate request are for. identity.go
metal.platform-kit.org/certificate-requestannotationSecret (BMC identity in progress)The name of the CertificateRequest for the identity. identity.go

Do not set or change an internal key. The operator can write it again or read a wrong record.

The anchor of a key is the key.

[](ref:labels-annotations#metal.platform-kit.org/hold)
[the hold annotation](ref:labels-annotations#metal.platform-kit.org/hold)