HostOSConfigurationModules¶
Available since 2.26.0 (17.1.0 and 16.1.0) TechPreview
Warning
This section is intended for informational purposes only. For security reasons and to ensure safe and reliable cluster operability, contact Mirantis support to start using this resource.
This section describes the HostOSConfigurationModules
custom resource (CR)
used in the Container Cloud API. It contains all necessary information to
introduce and load modules for further configuration of the host operating
system of the related Machine
object. For description of module format,
schemas, and rules, contact Mirantis support.
Note
This object must be created and managed on the management cluster.
A configuration module defined in a HostOSConfiguration object is
collected across all HostOSConfigurationModules
objects of a cluster.
After that, the related HostOSConfigurationModules
object name is added
as a reference to the status
section of the processed
HostOSConfiguration
object.
For demonstration purposes, we split the Container Cloud
HostOSConfigurationModules
CR into the following sections:
HostOSConfigurationModules metadata¶
metadata¶
The Container Cloud HostOSConfigurationModules
custom resource (CR) contains the following
fields:
apiVersion
Object API version that is
kaas.mirantis.com/v1alpha1
.
kind
Object type that is
HostOSConfigurationModules
.
The metadata
object field of the HostOSConfigurationModules
resource contains
the following fields:
name
Object name.
Configuration example:
apiVersion: kaas.mirantis.com/v1alpha1
kind: HostOSConfigurationModules
metadata:
name: host-os-configuration-modules-sample
HostOSConfigurationModules configuration¶
The spec
object field contains configuration for a
HostOSConfigurationModules
object and has the following fields:
modules
List of available modules to use as a configuration. Each entry has the following fields:
name
Module name.
url
URL to the archive containing the module package in the FQDN format. If omitted, the module is considered as the one provided and validated by Mirantis. Therefore, this field is mandatory for custom modules.
version
Module version in semver format.
sha256sum
Hash sum computed using the SHA-256 algorithm. The hash sum is automatically validated upon fetching the module package, the module does not load if the hash sum is invalid.
Configuration example:
spec:
modules:
- name: mirantis-provided-module-name
sha256sum: ff3c426d5a2663b544acea74e583d91cc2e292913fc8ac464c7d52a3182ec146
version: 1.0.0
- name: custom-module-name
url: https://fully.qualified.domain.name/to/module/archive/module-name-1.0.0.tgz
sha256sum: 258ccafac1570de7b7829bde108fa9ee71b469358dbbdd0215a081f8acbb63ba
version: 1.0.0
HostOSConfigurationModules status¶
The status
field of the HostOSConfigurationModules
object contains the
current state of the object:
modules
List of module statuses, indicating the loading results of each module. Each entry has the following fields:
name
Name of the loaded module.
version
Version of the loaded module.
url
URL to the archive containing the loaded module package in the FQDN format.
docURL
URL to the loaded module documentation if it was initially present in the module package.
description
Description of the loaded module if it was initially present in the module package.
sha256sum
Actual SHA-256 hash sum of the loaded module.
valuesValidationSchema
JSON schema used against the module configuration values if it was initially present in the module package. The value is encoded in the
gzip+base64
format.
state
Actual availability state of the module. Possible values are:
available
orerror
.
error
Error, if any, that occurred during the module fetching and verification.
playbookName
Name of the module package playbook.
HostOSConfigurationModules
status example:
status:
modules:
- description: Brief description of the module
docURL: https://docs.mirantis.com
name: mirantis-provided-module-name
playbookName: directory/main.yaml
sha256sum: ff3c426d5a2663b544acea74e583d91cc2e292913fc8ac464c7d52a3182ec146
state: available
url: https://example.mirantis.com/path/to/module-name-1.0.0.tgz
valuesValidationSchema: <gzip+base64 encoded data>
version: 1.0.0
- description: Brief description of the module
docURL: https://example.documentation.page/module-name
name: custom-module-name
playbookName: directory/main.yaml
sha256sum: 258ccafac1570de7b7829bde108fa9ee71b469358dbbdd0215a081f8acbb63ba
state: available
url: https://fully.qualified.domain.name/to/module/archive/module-name-1.0.0.tgz
version: 1.0.0