Allow labelling of BMHs

SIP cluster scheduling relies ultimately on labels on the underlying
BareMetalHosts for rack and server name.

This change allows operators to optionally add labels to BMHs
that are generated by the hostgenerator-m3 function, and gives
an example of how to use it.

Change-Id: Icc35ef81fc3a9fc6e6e89dc7ba58a385469cdf68
This commit is contained in:
Matt McEuen 2021-06-18 10:32:30 -05:00 committed by Matt McEuen
parent f74f4af7a9
commit a27476580d
2 changed files with 5 additions and 0 deletions

View File

@ -47,7 +47,10 @@ template: |
kind: BareMetalHost
metadata:
annotations:
{{- if $host.labels }}
labels:
{{ toYaml $host.labels | indent 4 }}
{{- end }}
name: {{ $hostName }}
spec:
online: false

View File

@ -23,6 +23,8 @@ hosts:
oam: 52:54:00:9b:27:4c
pxe: 52:54:00:b6:ed:31
hardwareProfile: default # defined in the hostgenerator-m3 function
labels: # optional
airshipit.org/example-label: "label-bmh-like-this"
node02:
bootMode: legacy
macAddress: 52:54:00:b6:ed:02