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.
How the kinds connect
Section titled “How the kinds connect”- You write an Asset. The operator finds the BMC and makes a ManagementEndpoint.
- The BMC reports its machines. The operator makes one Host for each machine.
- You write a HostClaim. It binds the Host and names a TalosNode.
- 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.
Group metal.platform-kit.org
Section titled “Group metal.platform-kit.org”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. |
Group os.platform-kit.org
Section titled “Group os.platform-kit.org”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. |
Who writes what
Section titled “Who writes what”- 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.
Names and scope
Section titled “Names and scope”- A HostClaim and a HostOperation have a namespace. All other kinds have cluster scope.
- A ManagementEndpoint has the name of its Asset. A Host has the serial number of the machine in lower case.
- A BiosSchema and a BiosSettings have the name of their Host.
- The short name of ManagementEndpoint is
mep.
Wait for a kind
Section titled “Wait for a kind”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.osstays atProvisioned=Falseuntil a person approves the install. See A claim that waits for approval. Complete=Falseon 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 ownobservedGeneration. - No kind has a
Readycondition that summarizes the others.
When you delete an object
Section titled “When you delete an object”| 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.
Catalogs
Section titled “Catalogs”- Phases: the phases of the four kinds that have
status.phase. - Conditions and reasons: each condition type and each reason.
- Labels, annotations and finalizers: each key that the operator reads or writes.
- Actions: the actions of a HostOperation.