components

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 4 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(cli client.Client, owner metav1.Object, DSCISpec *dsci.DSCInitializationSpec) error
      GetComponentName() string
      GetManagementState() operatorv1.ManagementState
      SetImageParamsMap(imageMap map[string]string) map[string]string
    }
    
Add reconcile and Events
  • Once you set up 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 one of the following values:
	//
	// - "Managed" : the operator is actively managing the component and trying to keep it active.
	//               It will only upgrade the component if it is safe to do so
	//
	// - "Removed" : the operator is actively managing the component and will not install it,
	//               or if it is installed, the operator will try to remove it
	//
	// +kubebuilder:validation:Enum=Managed;Removed
	ManagementState operatorv1.ManagementState `json:"managementState,omitempty"`

	// Add developer fields
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=2
	DevFlags DevFlags `json:"devFlags,omitempty"`
}

func (*Component) GetManagementState added in v2.2.0

func (c *Component) GetManagementState() operatorv1.ManagementState

type ComponentInterface

type ComponentInterface interface {
	ReconcileComponent(cli client.Client, owner metav1.Object, DSCISpec *dsci.DSCInitializationSpec) error
	GetComponentName() string
	GetManagementState() operatorv1.ManagementState
	GetComponentDevFlags() DevFlags
	SetImageParamsMap(imageMap map[string]string) map[string]string
	OverrideManifests(platform string) error
}

type DevFlags added in v2.2.0

type DevFlags struct {
	// List of custom manifests for the given component
	// +optional
	Manifests []ManifestsConfig `json:"manifests,omitempty"`
}

DevFlags defines list of fields that can be used by developers to test customizations. This is not recommended to be used in production environment.

type ManifestsConfig added in v2.2.0

type ManifestsConfig struct {
	// uri is the URI point to a git repo with tag/branch. e.g  https://github.com/org/repo/tarball/<tag/branch>
	// +optional
	// +kubebuilder:default:=""
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1
	URI string `json:"uri,omitempty"`

	// contextDir is the relative path to the folder containing manifests in a repository
	// +optional
	// +kubebuilder:default:=""
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=2
	ContextDir string `json:"contextDir,omitempty"`

	// sourcePath is the subpath within contextDir where kustomize builds start. Examples include any sub-folder or path: `base`, `overlays/dev`, `default`, `odh` etc
	// +optional
	// +kubebuilder:default:=""
	// +operator-sdk:csv:customresourcedefinitions:type=spec,order=3
	SourcePath string `json:"sourcePath,omitempty"`
}

Directories

Path Synopsis
Package codeflare provides utility functions to config CodeFlare as part of the stack which makes managing distributed compute infrastructure in the cloud easy and intuitive for Data Scientists
Package codeflare provides utility functions to config CodeFlare as part of the stack which makes managing distributed compute infrastructure in the cloud easy and intuitive for Data Scientists
Package dashboard provides utility functions to config Open Data Hub Dashboard: A web dashboard that displays installed Open Data Hub components with easy access to component UIs and documentation
Package dashboard provides utility functions to config Open Data Hub Dashboard: A web dashboard that displays installed Open Data Hub components with easy access to component UIs and documentation
Package datasciencepipelines provides utility functions to config Data Science Pipelines: Pipeline solution for end to end MLOps workflows that support the Kubeflow Pipelines SDK and Tekton
Package datasciencepipelines provides utility functions to config Data Science Pipelines: Pipeline solution for end to end MLOps workflows that support the Kubeflow Pipelines SDK and Tekton
Package kserve provides utility functions to config Kserve as the Controller for serving ML models on arbitrary frameworks
Package kserve provides utility functions to config Kserve as the Controller for serving ML models on arbitrary frameworks
Package modelmeshserving provides utility functions to config MoModelMesh, a general-purpose model serving management/routing layer
Package modelmeshserving provides utility functions to config MoModelMesh, a general-purpose model serving management/routing layer
Package ray provides utility functions to config Ray as part of the stack which makes managing distributed compute infrastructure in the cloud easy and intuitive for Data Scientists
Package ray provides utility functions to config Ray as part of the stack which makes managing distributed compute infrastructure in the cloud easy and intuitive for Data Scientists
Package workbenches provides utility functions to config Workbenches to secure Jupyter Notebook in Kubernetes environments with support for OAuth
Package workbenches provides utility functions to config Workbenches to secure Jupyter Notebook in Kubernetes environments with support for OAuth

Jump to

Keyboard shortcuts

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