Skip to content

Reference · API

Kinds

A kind is a type of object in the Kubernetes API. pk-metal has 17 kinds in two groups. You write some kinds to tell the operator what you want. The operator writes the others to tell you what it found.

The kinds of pk-metal in three groups: machines, BIOS and firmware, and Talos. An Asset finds a ManagementEndpoint, which reports a Host. A HostClaim binds the Host. A HostOperation changes it.Machines · metal.platform-kit.orgBIOS and firmware · metal.platform-kit.orgTalos · os.platform-kit.orgAssetManagementEndpointHostHostOperationEndpointProfileHostClaimMaintenanceWindowBiosSchemaBiosProfileBiosSettingsFirmwareProfileTalosClusterTalosNodeBootAssetEtcdBackupPolicyEtcdSnapshotTalosRolloutfindsreportschangesconfiguresbindsdelayslimitsmergemembermediamakesbacks upchangesA HostClaim names theTalosNode to install.A TalosRollout proposesone HostOperation for each node.
The 17 kinds. A filled box is a kind that you write. The operator writes the others.
  1. You write an Asset. The operator finds the BMC and makes a ManagementEndpoint.
  2. The BMC reports its machines. The operator makes one Host for each machine.
  3. You write a HostClaim. It binds the Host and names a TalosNode.
  4. The operator proposes a HostOperation. You approve it, and the operator installs the machine.

Rack to running node shows this path in detail. Assert and observe explains why two sets of kinds exist.

These kinds describe the hardware and the changes to it. The version is v1alpha1.

Kind Scope Written by Controller Purpose
Asset Cluster You asset One machine as your records know it: serial number and BMC MAC address.
ManagementEndpoint Cluster Operator endpoint One BMC and the facts that it reports.
EndpointProfile Cluster You endpoint convergence The account, the time servers and the certificate of a set of BMCs.
Host Cluster Operator host One physical machine as the operator finds it through its BMC.
HostClaim Namespace You claim A request for one machine and for the node to install on it.
HostOperation Namespace Operator operation One change to one machine, as a list of actions. A person approves it.
MaintenanceWindow Cluster You window The times when an approved change can start on a set of machines.
BiosProfile Cluster You convergence BIOS settings for a set of machines.
BiosSchema Cluster Operator convergence The BIOS settings that one machine has, and the values that each accepts.
BiosSettings Cluster Operator convergence The BIOS settings of one machine: wanted, actual, and the profile of each value.
FirmwareProfile Cluster You convergence The firmware version for a set of machines.

These kinds describe Talos Linux on the machines. The version is v1alpha1. All of them have cluster scope.

Kind Written by Controller Purpose
TalosCluster You cluster One Talos cluster: the configuration that its nodes share, and its state.
TalosNode You node One node of a cluster: its part of the configuration, and its state.
BootAsset Operator, or you boot asset A boot image or a configuration medium, and where to get it.
TalosRollout Operator, or you for a reboot rollout One change that goes through the nodes of a cluster, one node at a time. A person approves it.
EtcdBackupPolicy You backup A schedule for encrypted etcd snapshots of one cluster.
EtcdSnapshot Operator, or pk-metal backup snapshot One encrypted etcd snapshot.
You write
The kinds that say what must be true. Keep them in git. The operator reads their spec and writes only their status. See Git and GitOps.
The operator writes
The kinds that say what the operator found or what it proposes. Read them. Do not edit their spec.
You approve
A HostOperation and a TalosRollout change machines. The operator proposes them, and they wait for a person. Read Approval.

A script or a GitOps tool must read conditions, not the phase. This table gives the condition that means "done" for each kind that you write.

Kind Done when Command
Asset Materialized is True kubectl wait --for=condition=Materialized asset/<name>
TalosNode, before the install Rendered is True kubectl wait --for=condition=Rendered talosnode/<name>
HostClaim without spec.os Bound is True kubectl wait -n <ns> --for=condition=Bound hostclaim/<name>
HostClaim with spec.os Bound and Provisioned are True kubectl wait -n <ns> --for=condition=Provisioned hostclaim/<name> --timeout=45m
TalosNode, after the install Ready is True kubectl wait --for=condition=Ready talosnode/<name>
TalosCluster Available is True kubectl wait --for=condition=Available taloscluster/<name>
TalosRollout Complete is True kubectl wait --for=condition=Complete talosrollout/<name>
EndpointProfile Configured is True on each ManagementEndpoint that it selects kubectl wait --for=condition=Configured mep --all
  • A wait does not approve. A claim with spec.os stays at Provisioned=False until a person approves the install. See A claim that waits for approval.
  • Complete=False on a rollout is an end too: the rollout failed, or someone aborted it. A wait for True then ends with a timeout.
  • Only the Asset has status.observedGeneration. For the other kinds, the status can be older than your last change for a short time. Each condition has its own observedGeneration.
  • No kind has a Ready condition that summarizes the others.
Kind What the deletion does
HostClaim The operator releases the machine. A machine that runs its node gets a release operation that wipes the disk. It waits for approval. The finalizer metal.platform-kit.org/release holds the claim until the machine is free.
TalosNode The finalizer os.platform-kit.org/member holds the object while a claim, an operation or an etcd member uses the node.
TalosCluster The object goes at once, and with it the Secrets that it owns: the kubeconfig, the talosconfig and the record of the applied secrets bundle. The machines continue to run.
Asset Kubernetes deletes the ManagementEndpoint. While a claim holds the machine, the finalizer metal.platform-kit.org/claim-protection keeps the endpoint and the Host.
Profiles, MaintenanceWindow, EtcdBackupPolicy The operator stops the work for the object. It does not undo a change on a machine, and it keeps the snapshots.

Git and GitOps says what this means for a tool that prunes.