- Local Storage Operator (LSO)
- OpenShift Virtualization (CNV)
- OpenShift Data Foundation (ODF)
- Logical Volume Manager (LVM)
- Multi-Cluster Engine (MCE)
To implement support for a new OLM operator plugin you need to make following changes:
- Introduce new validation IDs for the new operator in the swagger specification:
- for host validation:
host-validation-id: type: string enum: - 'connected' ... - 'lso-requirements-satisfied' - 'cnv-requirements-satisfied' - 'odf-requirements-satisfied' - 'lvm-requirements-satisfied'
- for cluster validation:
cluster-validation-id: type: string enum: - 'machine-cidr-defined' ... - 'lso-requirements-satisfied' - 'cnv-requirements-satisfied' - 'odf-requirements-satisfied' - 'lvm-requirements-satisfied'
- for host validation:
- Regenerate code by running
skipper make generate
- Add the new validation IDs to proper category - "operators":
- for cluster validation:
func (v validationID) category() (string, error) { ... case IsCnvRequirementsSatisfied, IsLsoRequirementsSatisfied, IsOdfRequirementsSatisfied, IsLvmRequirementsSatisfied: return "operators", nil
- for host validaton:
func (v validationID) category() (string, error) { ... case AreLsoRequirementsSatisfied, AreCnvRequirementsSatisfied, AreOdfRequirementsSatisfied, AreLvmRequirementsSatisfied: return "operators", nil
- for cluster validation:
- Modify the installation state machine by adding the new validationIDs to the list of required checks:
- for cluster:
var requiredForInstall = stateswitch.And(..., ..., If(IsLsoRequirementsSatisfied), If(IsCnvRequirementsSatisfied), If(IsOdfRequirementsSatisfied), If(IsLvmRequirementsSatisfied))
- for host:
var isSufficientForInstall = stateswitch.And(..., ..., If(AreLsoRequirementsSatisfied), If(AreCnvRequirementsSatisfied), If(AreOdfRequirementsSatisfied), If(AreLvmRequirementsSatisfied))
- for cluster:
- Implement the
Operator
interface - Plug the new
Operator
implementation in the OperatorManager constructor:func NewManager(log logrus.FieldLogger) Manager { return NewManagerWithOperators(log, lso.NewLSOperator(), cnv.NewCnvOperator(log), odf.NewOdfOperator(log), lvm.NewLvmOperator(log)) }
- Implement tests verifying new OLM operator installation and validation, i.e. in internal/bminventory/inventory_test.go
- Make sure all the tests are green
A plugin can generate two distinct set of manifests, specified by the two return values of the GenerateManifests(*common.Cluster) (map[string][]byte, []byte, error)
method. They are required to:
- Install the operator
- Configure the operator
The first return value could be used to specify a set of manifests that will be applied directly to the control plane during the bootstrap phase. This set is usually composed by a manifest for creating a new namespace, a new subscription and a new operator group CR for the involved operator.
The second return value it's a manifest used to configure the freshly installed operator, and it will be applied by the assisted-installer-controller
job, only after the cluster have been successfully created and the OLM operators are all ready (currently the assisted-installer-controller
retrieves the whole list of configurations by downloading the custom_manifests.json
file fetched from the Assisted Service).