Kind · os.platform-kit.org/v1alpha1
BootAsset
A BootAsset is one boot image and the way to fetch it. The BootAsset controller builds or addresses the image. The InsertMedia action mounts it on the BMC.
At a glance
Section titled “At a glance”- Group and version
os.platform-kit.org/v1alpha1- Scope
- Cluster.
- Written by
- You, or the operator: it makes
<node>-embeddedfor a machine behind a one-slot BMC. - Reconciled by
- BootAsset controller
- Condition
Ready- Sample
bootasset.yaml
Strategies
Section titled “Strategies”| Strategy | Content | Secret | Fields | Where it rests | How the BMC fetches it |
|---|---|---|---|---|---|
factory |
The generic Talos installer, with the schematic | no | talosVersion, schematic |
the media store, downloaded from the URL in status.url |
a grant of the media service, with no credentials |
configISO |
The machine config of one node, about 10 KB | yes | nodeRef |
a Secret in pk-metal |
a grant of the media service |
embeddedInstaller |
An installer with the config of one node inside | yes | nodeRef, talosVersion, schematic |
the media store | a grant of the media service |
The kind refuses fields that do not belong to the strategy.
factory- The controller registers the schematic with the image factory, downloads the image into the media store over verified TLS, and records its digest. Then it sets
Ready. The BMC never connects to the image factory. The manager needs a media store; without--media-storeit uses a temporary directory in the pod. configISO- The controller packs the rendered config of the TalosNode into an ISO with the label
metal-iso. Talos reads it at boot. A new config gives a new pack. embeddedInstaller- For a BMC with one media slot. An imager Job builds the installer and writes it to the media store. A change of the config, the version, the schematic or the imager gives a new build key and a new build.
Lifecycle
Section titled “Lifecycle”- You or the operator create the BootAsset.
- The controller builds the artifact, or downloads it. While a build or a download runs,
Ready=Falsewith reasonBuilding. - The artifact is complete.
Ready=Truewith reasonArtifactBuiltorImageDownloaded.status.digestnames the bytes. - An approved operation mounts it. The operation pins the digest. Other bytes fail the step.
- The inputs change. The controller builds again. The status names the old artifact until the new build is complete.
- The install ends with a hand-off, or the boot fails. The operator deletes the BootAssets it made that carry a machine config (
configISO,embeddedInstaller). The operation keeps their digests. A retry makes them again.
Rules for the whole spec (the API server refuses a change that breaks one):
- configISO takes nodeRef and nothing else
- factory takes talosVersion (and optionally schematic), never nodeRef
- embeddedInstaller takes nodeRef and talosVersion (and optionally schematic)
| Field | Type | Description |
|---|---|---|
nodeRef | object | NodeRef names the TalosNode whose rendered config the artifact carries. configISO and embeddedInstaller. |
namerequired | string | The name of the object. |
schematic | object | Schematic customizes the install image (system extensions, kernel arguments). factory and embeddedInstaller; omitted means the vanilla image. |
customization | object | SchematicCustomization holds the image customization knobs. |
extraKernelArgs | []string | ExtraKernelArgs append to the image's kernel command line, for example where to put the console (console=ttyS0, what the BMC's serial-over-LAN shows). Do not add talos.config=metal-iso: the operator adds it to the boot medium itself, and the installed system must not carry it. |
systemExtensions | object | SystemExtensions bakes extensions into the image. |
officialExtensions | []string | OfficialExtensions are siderolabs/* extension names (siderolabs/drbd). |
strategyrequired | string | Strategy selects how the artifact is produced.configISOfactoryembeddedInstaller |
talosVersion | string | TalosVersion pins the release of the install image. factory and embeddedInstaller. |
Status
Section titled “Status”| Field | Type | Description |
|---|---|---|
artifactSecretRef | object | ArtifactSecretRef is where the built artifact rests (key asset.iso), owned by this BootAsset and GC'd with it. configISO only. |
namerequired | string | The name of the object. |
namespacerequired | string | The namespace of the object. |
buildJob | string | BuildJob is the imager Job of the latest build, in the operator's namespace. A failed Job is kept so its log can be read. embeddedInstaller only. |
buildKey | string | BuildKey names the stored artifact in the media store. For an embeddedInstaller it names the inputs: config, Talos version, schematic and imager image; a change of any input is a new key and a new build. For a factory image it is a hash of URL. embeddedInstaller and factory. |
conditions | []object | Conditions: Ready. |
configDigest | string | ConfigDigest is the rendered config (the TalosNode's status.configDigest) the stored artifact carries. embeddedInstaller only. |
digest | string | Digest is sha256:<hex> of the artifact bytes. |
size | integer (int64) | Size is the artifact size in bytes. |
url | string | URL is where the operator downloads the artifact from. A BMC never fetches it there. factory only. |
Columns of kubectl get bootassets (the columns marked wide show only with -o wide):
| Column | Value |
|---|---|
NAME | .metadata.name |
STRATEGY | .spec.strategy |
NODE | .spec.nodeRef.name |
SIZE | .status.size |
Reasons of Ready
Section titled “Reasons of Ready”| Reason | Status | Meaning |
|---|---|---|
ArtifactBuilt |
True | configISO or embeddedInstaller is complete. |
ImageDownloaded |
True | factory: the image is in the media store, and its digest is in the status. |
Building |
False | A build runs. |
BuildFailed |
False | The build failed. The message gives the error. A failed imager Job stays, so you can read its log. |
BuilderUnavailable |
False | No media store, or for embeddedInstaller: no imager image for the Talos version, or a Talos version without embedded config. The message names the flag or field. |
SchematicUnavailable |
False | The image factory did not register the schematic, so the image can be missing. |
NodeNotFound, ConfigNotRendered |
False | The TalosNode or its config is not there yet. |
Example
Section titled “Example”apiVersion: os.platform-kit.org/v1alpha1kind: BootAssetmetadata: name: node-1-configspec: strategy: configISO nodeRef: name: node-1$ kubectl get bootassetsNAME STRATEGY NODE SIZEnode-1-config configISO node-1 10240install-drbd factorynode-3-embedded embeddedInstaller node-3 419430400