Hardware Labels
When a node is registered, hardware data is collected and made available to the MachineRegistration in the same way as SMBIOS data.
This data can be used for easy identification and selection via a MachineSelector.
The following are available for templating:
Label | Description |
---|---|
|
The hostname of the node (at registration time) |
|
The total RAM memory in the node, expressed in bytes |
|
Total CPU cores |
|
Total CPU threads |
|
CPU vendor |
|
CPU model |
|
GPU vendor (Only available if the node has an identifiable GPU) |
|
GPU model (Only available if the node has an identifiable GPU) |
|
Number of network interfaces in the system |
|
Network interface name |
|
Boolean indicating virtual network interface |
|
Number of block devices in the system (includes DVD and USB drives) |
|
Device name of the block device (i.e. sda, sr0, vda, etc…) |
|
Whether this block device is removable (i.e. DVD) |
|
Total space in this block device, expressed in bytes |
|
Drive type of this block device, see table below |
|
Controller type for this block device connection, see table below |
On both |
Block device drive types
Type | Description |
---|---|
HDD |
Hard disk drive |
FDD |
Floppy disk drive |
ODD |
Optical disk drive |
SSD |
Solid-state drive |
virtual |
virtual drive i.e. loop devices |
Unknown |
unknown drive type |
Block device controller types
Type | Description |
---|---|
IDE |
Integrated Drive Electronics |
SCSI |
Small computer system interface |
NVMe |
Non-volatile Memory Express |
MMC |
Multi-media controller (used for mobile phone storage devices) |
virtio |
Virtualized storage controller/driver |
loop |
loop device |
Unknown |
unknown controller type |
Example MachineRegistration
apiVersion: elemental.cattle.io/v1beta1
kind: MachineRegistration
metadata:
name: my-nodes
namespace: fleet-default
spec:
machineName: "${System Data/Runtime/Hostname}"
config:
cloud-config:
users:
- name: root
passwd: root
elemental:
install:
reboot: true
device: /dev/sda
debug: true
machineInventoryLabels:
elemental.cattle.io/CpuTotalCores: "${System Data/CPU/Total Cores}"
elemental.cattle.io/CpuTotalThreads: "${System Data/CPU/Total Threads}"
elemental.cattle.io/TotalMemoryBytes: "${System Data/Memory/Total Physical Bytes}"
elemental.cattle.io/NumberBlockDevices: "${System Data/Block Devices/Number Devices}"