airshipctl/manifests/function/hostgenerator-m3
Sean Eagan 299b2833b2 Pin krm function calls
This pins krm function calls to version `v2` which represents [0] [1] the latest
2.x.x semantic version. If we need to make breaking changes to any krm functions,
that can now be done by incrementing their major version and thus not
breaking these references.

[0]: https://review.opendev.org/c/airship/airshipctl/+/762924
[1]: https://review.opendev.org/c/airship/airshipctl/+/780875

Closes: #419
Change-Id: I6cf6519511c77da6cac7e46a6b56ea338bcf150c
2021-03-24 09:28:54 -05:00
..
cleanup Adding encryption of k8s secrets and iso users passwords 2021-02-12 04:07:36 +00:00
replacements Pin krm function calls 2021-03-24 09:28:54 -05:00
README.md Deduplicate airshipctl manifest networking 2020-10-21 16:26:10 -05:00
hosttemplate.yaml Pin krm function calls 2021-03-24 09:28:54 -05:00
kustomization.yaml Add an m3 host generator function 2020-07-17 15:30:26 -05:00

README.md

Function: hostgenerator-m3

This function 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.

To use this function, do the following:

  • Supply a networking catalogue, which outlines things that are typically common across hosts in a site, such as networking interfaces, DNS servers, and other networking info. Example: manifests/type/gating/shared/catalogues/common-networking.yaml

  • Supply a host-catalogue, which contains host-specific data, such as IP addresses and BMC information. Example: manifests/site/test-site/shared/catalogues/hosts.yaml

  • Supply a host-generation-catalogue for each phase that needs to deploy one or more BMHs. This catalogue simply lists the specific hosts that should be deployed during that phase. Example: manifests/site/test-site/ephemeral/bootstrap/hostgenerator/host-generation.yaml

  • If any per-host changes need to be made, they can be layered on top as site- or phase-specific Kustomize patches against the generated documents. E.g, if one host has a different network interface name, or if different details need to be used during ISO bootstrapping and normal deployment. Example: manifests/site/test-site/ephemeral/bootstrap/baremetalhost.yaml