Add an m3 host generator function
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
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Type-level networking catalogue. This info feeds the Templater
|
||||
# kustomize plugin config in the hostgenerator-m3 function.
|
||||
apiVersion: airshipit.org/v1alpha1
|
||||
kind: VariableCatalogue
|
||||
metadata:
|
||||
name: common-networking-catalogue
|
||||
commonNetworking:
|
||||
links:
|
||||
- id: oam
|
||||
name: enp0s3
|
||||
type: phy
|
||||
mtu: "1500"
|
||||
# ethernet_mac_address: <from host-catalogue> (optional)
|
||||
- id: pxe
|
||||
name: enp0s4
|
||||
type: phy
|
||||
mtu: "1500"
|
||||
# ethernet_mac_address: <from host-catalogue> (optional)
|
||||
networks:
|
||||
- id: oam-ipv4
|
||||
type: ipv4
|
||||
link: oam
|
||||
# ip_address: <from host-catalogue>
|
||||
netmask: 255.255.255.0
|
||||
routes:
|
||||
- network: 0.0.0.0
|
||||
netmask: 0.0.0.0
|
||||
gateway: 10.23.25.1
|
||||
- id: pxe-ipv4
|
||||
type: ipv4
|
||||
link: pxe
|
||||
# ip_address: <from host-catalogue>
|
||||
netmask: 255.255.255.0
|
||||
services:
|
||||
- address: 8.8.8.8
|
||||
type: dns
|
||||
- address: 8.8.4.4
|
||||
type: dns
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- common-networking.yaml
|
||||
Reference in New Issue
Block a user