sidero
sidero copied to clipboard
Allow user-supplied Server label mapping
In a follow-up to the #282 feature of standard Label Selectors, we should add the ability for users to specify custom labels which should be automatically applied to Servers which match certain other labels.
The idea is: apply new label X if a Server matches a given spec value.
For instance:
- if Server has field
spec.cpu.version
containing the stringE-2124G
, add labelcustom-cpu-class
=small
- if Server has field
spec.system.productName
matching exactlySYS-5039MC-H12TRF
, add labelchassis
=blade
We should probably scope the available match fields to only a specific set (spec.cpu
, spec.system
, etc) rather than make all of spec
matchable.
This could be made into an optional ConfigMap or CRD, as appropriate, but it should not be a required item.