Add SIP scheduling labels to catalogues & SIP CR

Adds labels used by ViNO & SIP to schedule subcluster VMs appropriately,
for rack and undercloud server name.

This also trues up the label definitions in the SIP CRs to match,
and configures the Metal3Cluster resource to synchronize the labels
from BMHs to Nodes.

This change updates the airshipctl pin to incorporate related functionality:
https://review.opendev.org/c/airship/airshipctl/+/797130

Change-Id: I6cf2bc653589d142736990cdfadf82641a6ca4d1
This commit is contained in:
Matt McEuen 2021-06-18 10:41:05 -05:00
parent cbe110e79b
commit 6830bf3ed3
6 changed files with 55 additions and 10 deletions

View File

@ -11,3 +11,11 @@ patchesJson6902:
kind: KubeadmControlPlane
name: cluster-controlplane
path: iptables-setup.yaml
patchesJson6902:
- target:
group: infrastructure.cluster.x-k8s.io
version: v1alpha4
kind: Metal3Cluster
name: target-cluster
path: labelsync-setup.yaml

View File

@ -0,0 +1,5 @@
# This configures Metal3Cluster resources for label syncing
- op: add
path: "/metadata/annotations"
value:
metal3.io/metal3-label-sync-prefixes: "airshipit.org"

View File

@ -25,6 +25,9 @@ hosts:
storage-ipv4: 172.62.0.11
calico-ipv4: 172.64.0.11
hardwareProfile: default # defined in the hostgenerator-m3 function
labels:
airshipit.org/rack: r01
airshipit.org/server: stl3r01s01
stl3r01s02:
bootMode: legacy
macAddress: E4:43:4B:EE:B0:43
@ -38,6 +41,9 @@ hosts:
storage-ipv4: 172.62.0.12
calico-ipv4: 172.64.0.12
hardwareProfile: default
labels:
airshipit.org/rack: r01
airshipit.org/server: stl3r01s02
stl3r01s03:
bootMode: legacy
#macAddress: E4:43:4B:EE:D7:B8
@ -52,6 +58,9 @@ hosts:
storage-ipv4: 172.62.0.13
calico-ipv4: 172.64.0.13
hardwareProfile: default # defined in the hardwareprofile-example function
labels:
airshipit.org/rack: r01
airshipit.org/server: stl3r01s03
stl3r01s04:
bootMode: legacy
#macAddress: E4:43:4B:EE:D7:B8
@ -66,6 +75,9 @@ hosts:
storage-ipv4: 172.62.0.14
calico-ipv4: 172.64.0.14
hardwareProfile: default # defined in the hardwareprofile-example function
labels:
airshipit.org/rack: r01
airshipit.org/server: stl3r01s04
stl3r01s05:
bootMode: legacy
#macAddress: E4:43:4B:EE:D7:B8
@ -80,6 +92,9 @@ hosts:
storage-ipv4: 172.62.0.15
calico-ipv4: 172.64.0.15
hardwareProfile: default # defined in the hardwareprofile-example function
labels:
airshipit.org/rack: r01
airshipit.org/server: stl3r01s05
stl3r01s06:
bootMode: legacy
#macAddress: E4:43:4B:EE:D7:B8
@ -94,3 +109,7 @@ hosts:
storage-ipv4: 172.62.0.16
calico-ipv4: 172.64.0.16
hardwareProfile: default # defined in the hardwareprofile-example function
labels:
airshipit.org/rack: r01
airshipit.org/server: stl3r01s06

View File

@ -23,6 +23,9 @@ hosts:
oam: 52:54:00:9b:27:4c
pxe: 52:54:00:b6:ed:31
hardwareProfile: default # defined in the hostgenerator-m3 function
labels:
airshipit.org/rack: r01
airshipit.org/server: node01
node02:
bootMode: UEFI
macAddress: 52:54:00:b6:ed:02
@ -37,6 +40,9 @@ hosts:
oam: 52:54:00:9b:27:02
pxe: 52:54:00:b6:ed:02
hardwareProfile: default
labels:
airshipit.org/rack: r01
airshipit.org/server: node02
node03:
bootMode: UEFI
macAddress: 52:54:00:b6:ed:23
@ -50,7 +56,10 @@ hosts:
macAddresses:
oam: 52:54:00:9b:27:07
pxe: 52:54:00:b6:ed:23
hardwareProfile: default # defined in the hardwareprofile-example function
hardwareProfile: default
labels:
airshipit.org/rack: r01
airshipit.org/server: node03
node04:
bootMode: UEFI
macAddress: 52:54:00:36:5e:e3
@ -63,4 +72,8 @@ hosts:
macAddresses:
oam: 52:54:00:dc:ab:04
pxe: 52:54:00:51:0b:e4
hardwareProfile: default # defined in the hardwareprofile-example function
hardwareProfile: default
labels:
airshipit.org/rack: r01
airshipit.org/server: node04

View File

@ -9,16 +9,16 @@ spec:
ControlPlane:
labelSelector:
matchLabels:
vino.airshipit.org/flavor: control-plane
topologyKey: vino.airshipit.org/rack
airshipit.org/flavor: control-plane
topologyKey: airshipit.org/rack
count:
active: 1
standby: 1
Worker:
labelSelector:
matchLabels:
vino.airshipit.org/flavor: worker
topologyKey: vino.airshipit.org/host
airshipit.org/flavor: worker
topologyKey: airshipit.org/server
count:
active: 2
standby: 1 # Slew for upgrades

View File

@ -9,16 +9,16 @@ spec:
ControlPlane:
labelSelector:
matchLabels:
vino.airshipit.org/flavor: control-plane
topologyKey: vino.airshipit.org/rack
airshipit.org/flavor: control-plane
topologyKey: airshipit.org/rack
count:
active: 1
standby: 1
Worker:
labelSelector:
matchLabels:
vino.airshipit.org/flavor: worker
topologyKey: vino.airshipit.org/host
airshipit.org/flavor: worker
topologyKey: airshipit.org/server
count:
active: 2
standby: 1 # Slew for upgrades