- Local Storage Operator (LSO)
- OpenShift Virtualization (CNV)
- OpenShift Data Foundation (ODF)
- Logical Volume Manager (LVM)
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