
This PS has a function which constructs a collection of Metal3 BareMetalHost resources, along with associated configuration Secrets. It solves for a couple of things: 1. pulling the nitty gritty details for generating BMH into one reusable place, 2. allowing the site-specific details to be filled in via catalogues of values This function leverages a couple of different plugins in sequence: The airshipctl Replacement plugin, which pulls the site-specific data from the catalogue documents into a Templater plugin configuration; and then the airshipctl Templater plugin, which generates a variable number of BMHs in a data-driven fashion. More details can be found in the README.md in this patchset. Closes: #245 Change-Id: I3ddbd36dc53ea6afbd633098c985f4b28bcbb793
35 lines
831 B
YAML
35 lines
831 B
YAML
# These rules inject host-specific information from the `host-catalogue`
|
|
# into the hostgenerator-m3 function's Template plugin config.
|
|
apiVersion: airshipit.org/v1alpha1
|
|
kind: ReplacementTransformer
|
|
metadata:
|
|
name: m3-host-replacements
|
|
replacements:
|
|
- source:
|
|
objref:
|
|
name: host-catalogue
|
|
fieldref: hosts.m3
|
|
target:
|
|
objref:
|
|
kind: Templater
|
|
name: m3-host-template
|
|
fieldrefs: [values.hosts]
|
|
- source:
|
|
objref:
|
|
name: host-generation-catalogue
|
|
fieldref: hosts.m3
|
|
target:
|
|
objref:
|
|
kind: Templater
|
|
name: m3-host-template
|
|
fieldrefs: [values.hostsToGenerate]
|
|
- source:
|
|
objref:
|
|
name: common-networking-catalogue
|
|
fieldref: commonNetworking
|
|
target:
|
|
objref:
|
|
kind: Templater
|
|
name: m3-host-template
|
|
fieldrefs: [values.commonNetworking]
|