sidero
sidero copied to clipboard
Automate some Server labels
As part of the process following the #282 LabelSelector feature, we should automatically add some well-known labels to make things easier.
Examples (not final, just ideas):
-
sidero.dev/cpu-architecture
=amd64
-
sidero.dev/cpu-core-count
=8
-
sidero.dev/disk-count
=4
-
sidero.dev/disk-count-nvme
= `2' -
sidero.dev/disk-count-ssd
=2
-
sidero.dev/network-interface-count
=4
-
sidero.dev/network-interface-count-1g
=2
-
sidero.dev/network-interface-count-10g
=2
The current system information is mostly opaque, uparsed string data, which is difficult to make use of, in terms of ServerClasses. Offering some well-known labels will help make ServerClass construction easier. We should, however, balance the number of labels automatically added with their utility.
To start, I wonder if what iPXE/PXE provides makes sense as a starting point:
2021/05/22 00:10:21 HTTP GET /ipxe?uuid=15839a00-8f07-11e9-8000-ac1f6bf200c2&mac=ac-1f-6b-f2-00-c2&domain=&hostname=&serial=S329106X9705490&arch=x86_64
The only one of these which jumps out at me the is arch, but Kubernetes already handles that. I don't think UUID, MAC, hostname, or serial number make sense as labels (indexed selectors) as opposed to general data in the spec.