Bare metal provider

MOSK bare metal provider provisions nodes of management and MOSK clusters and runs the LCM Agent on these nodes. It runs in a management cluster and requires connection to the bare metal provider backend.

The bare metal provider interacts with the following types of public API objects:

Public API object name

Description

KaaSRelease

Contains the following information about clusters:

  • Version of the supported Cluster release for a management cluster

  • List of supported Cluster releases for MOSK clusters and supported upgrade path

  • Description of Helm charts that are installed on a management cluster

ClusterRelease

  • Provides a specific version of a management or MOSK cluster. Any Cluster release object, as well as a Container Cloud release object never changes, only new releases can be added. Any change leads to a new release of a cluster.

  • Contains references to all components and their versions that are used to deploy all cluster types:

    • LCM components:

      • LCM Agent

      • Ansible playbooks

      • Scripts

      • Description of steps to execute during a cluster deployment and upgrade

      • Helm Controller image references

    • Supported Helm charts description:

      • Helm chart name and version

      • Helm release name

      • Helm values

Cluster

  • References the BareMetalHostCredential, KaaSRelease and ClusterRelease objects.

  • Represents all cluster-level resources, for example, networks, load balancer for the Kubernetes API, and so on. It uses data from the BareMetalHostCredential object to create these resources and data from the KaaSRelease and ClusterRelease objects to ensure that all lower-level cluster objects are created.

Machine

  • References the Cluster object.

  • Represents one node of a MOSK cluster and contains all data to provision it.

BareMetalHostCredential

Contains all information about the Baseboard Management Controller (bmc) credentials.

PublicKey

Is provided to every machine to obtain SSH access.

The bare metal provider performs the following operations:

  • Consumes the below types of data from a management cluster:

    • Credentials to connect to the provider backend

    • Deployment instructions from the KaaSRelease and ClusterRelease objects

    • The cluster-level parameters from the Cluster objects

    • The machine-level parameters from the Machine objects

  • Prepares data for all MOSK components:

    • Creates the LCMCluster and LCMMachine custom resources for LCM Controller and LCM Agent. The LCMMachine custom resources are created empty to be later handled by the LCM Controller.

    • Creates the HelmBundle custom resources for the Helm Controller using data from the KaaSRelease and ClusterRelease objects.

    • Creates service accounts for these custom resources.

    • Creates a scope in Identity and access management (IAM) for a user access to a MOSK cluster.

  • Provisions nodes for a MOSK cluster.

  • Installs and enables LCM Agent using the cloud-init script.

  • Installs Helm Controller as a Helm v3 chart.

The following diagram illustrates the bare metal provider data flow:

../../_images/provider-dataflow.png