components

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

Component Integration

The components dir of the codebase is hosts all the component specific logic of the operator. Since, ODH operator is an integration point to deploy ODH component manifests it is essential to have common processes to integrate new components.

Integrating a new component

To ensure a component is integrated seamlessly in the operator, follow the steps below:

Add Component to DataScienceCluster API spec

DataScienceCluster CRD is responsible for defining the component fields and exposing them to end users. Add your component to it's api spec:

type Components struct {
   NewComponent newcomponent.newComponentName `json:"newcomponent,omitempty"`
}
Add Component module
  • Add a new module, <newComponent>, under components/ directory to define code specific to the new component. Example can be found here
  • Define Path and ComponentName variables for the new component.
Implement common Interface
  • Define struct that includes a shared struct Component with common fields.
  • Implement interface methods according to your component
    type ComponentInterface interface {
        ReconcileComponent(owner metav1.Object, client client.Client, scheme *runtime.Scheme,
            enabled bool, namespace string) error
        GetComponentName() string
        SetImageParamsMap(imageMap map[string]string) map[string]string
    }
    
Add reconcile and Events
  • Once you setup the new component module, add the component to Reconcile function in order to deploy manifests.
  • This will also enable/add status updates of the component in the operator.
Add Unit and e2e tests
  • Components should add unit tests for any component specific functions added to the codebase
  • Components should update e2e tests to capture deployments introduced by the new component

Integrated Components

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	// Set to "true" to enable component, "false" to disable component. A disabled component will not be installed.
	Enabled bool `json:"enabled"`
}

type ComponentInterface

type ComponentInterface interface {
	ReconcileComponent(owner metav1.Object, client client.Client, scheme *runtime.Scheme,
		enabled bool, namespace string) error
	GetComponentName() string
	SetImageParamsMap(imageMap map[string]string) map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL