Can the matchExpressions "In" operator use regex? ...
# elemental
q
Can the matchExpressions "In" operator use regex? I want to search for "worker" in hostname and then assign it to the worker pool.
b
I thought it did it by registration endpoint
q
this would mean 1 image for workers and 1 for controllers. for every cluster. i am trying to reduce the amount of images.
b
I mean that's how we're doing it. We actually have 3 because some of our workers have a different disk setup than others ¯\_(ツ)_/¯
Like our control plane doesn't have NVME drives for longhorn.
q
well, i think this is fine if you have just a few clusters. we have a lot. as a vmware user it would be nice if the the labels could be configured with the guestinfo information as we can set this on vm creation. something like:
Copy code
machineInventoryLabels:
    element: "${System VMware/guestinfo.nodetype}"
b
Yeah we're not doing VMs, we're doing bare metal.
In that case I would think that you can do this through the vSphere provider and not worry about the registration.
Since it can auto scale via the pool instead.
q
yes we have this in place for regular rancher clusters but i dont see this for elemental
b
I'm confused as my elemental makes regular rancher clusters.
q
the registration process of nodes seems quite different
m
Hey Mike, wondering if some of the data from VMware and visible as SMBIOS data in the host (something appearing in the
dmidecode
output). If so would be straightforward to add a label tracking that SMBIOS data.
q
after a lot of try and error i found 1 setting which i can access with dmidecode.
smBIOS.assetTag
is written to Chassis Information. so finally i can do:
Copy code
machineInventoryLabels:
    nodeType: "${Chassis Information/Asset Tag}"
and filter worker and controller using only 1 iso image 🥳
🚀 1