opendatahub-operator

command module
v1.8.0 Latest Latest
Warning

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

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

README

Open Data Hub Operator

Introduction

The Open Data Hub operator is responsible for managing the deployment and lifecycle of ODH Component manifests in odh-manifests using the KfDef Custom Resource. The focus is on supporting the ODH Core stack in the OpenShift clusters.

NOTE: The Open Data Hub operator was originally a downstream project of the kfctl operator but has diverged from the original functionality after the Kubeflow community deprecated the use of kfctl for deployment in favor of kustomize. kfctl cli is no longer a maintained or supported tool for parsing or processing the kfdef custom resource.

##Usage

Installation

The latest version of operator can be installed from the community-operators catalog on OperatorHub. It can also be build and installed from source manually, see the Developer guide for further instructions.

Developer Guide
Pre-requisites
  • Go version go1.18.4
  • operator-sdk version can be updated to v1.24.1
Build Image
  • Custom operator image can be built using your local repository

    make image -e IMG=quay.io/<username>/opendatahub-operator:<custom-tag>
    

    The default image used is quay.io/opendatahub/opendatahub-operator:dev-<VERSION>

  • Once the image is create, the operator can be deployed either directly, or through OLM. For each deployment method a kubeconfig should be exported

    export KUBECONFIG=<path to kubeconfig>
    
Deployment

Deploying operator locally

  • Define operator namespace

    export OPERATOR_NAMESPACE=<namespace-to-install-operator>
    
  • Deploy the created image in your cluster using following command:

    make deploy -e IMG=quay.io/<username>/opendatahub-operator:<custom-tag>
    
  • To remove resources created during installation use:

    make undeploy
    

Deploying operator using OLM

  • Define operator namespace

    export OPERATOR_NAMESPACE=<namespace-to-install-operator>
    
  • To create a new bundle, run following command:

    make bundle
    

    Note : Skip the above step if you want to run the existing operator bundle.

  • Build Bundle Image:

    make bundle-build bundle-push BUNDLE_IMG=quay.io/<username>/opendatahub-operator-bundle:<VERSION>
    
  • Run the Bundle on a cluster:

    operator-sdk run bundle quay.io/<username>/opendatahub-operator-bundle:<VERSION> --namespace $OPERATOR_NAMESPACE
    
Example KfDefs

When the operator is installed sucessfully in the cluster, a user can make use of following KfDefs to install Open Data Hub components:

  • KfDef for Core Components
Run e2e Tests

A user can run the e2e tests in the same namespace as the operator. To deploy opendatahub-operator refer to this section. The following environment variables must be set when running locally:

export KUBECONFIG=/path/to/kubeconfig
export OPERATOR_NAMESPACE=<namespace-of-operator>

Once the above variables are set, run the following:

make e2e-test

Additional flags that can be passed to e2e-tests by setting up E2E_TEST_FLAGS variable. Following table lists all the available flags to run the tests:

Flag Description Default value
--skip-deletion To skip running of kfdef-deletion test that includes deleting KfDef resources. Assign this variable to true to skip KfDef deletion. false

Example command to run full test suite in a custom namespace, skipping the test for KfDef deletion.

make e2e-test -e OPERATOR_NAMESPACE=<YOUR_NAMESPACE> -e E2E_TEST_FLAGS="--skip-deletion=true"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
apps
Package apis contains Kubernetes API groups.
Package apis contains Kubernetes API groups.
aws.plugins.kubeflow.org/v1alpha1
Package v1alpha1 contains API Schema definitions for the aws.plugins.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=aws.plugins.kubeflow.org
Package v1alpha1 contains API Schema definitions for the aws.plugins.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=aws.plugins.kubeflow.org
gcp.plugins.kubeflow.org/v1alpha1
Package v1alpha1 contains API Schema definitions for the gcp.plugins.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=gcp.plugins.kubeflow.org
Package v1alpha1 contains API Schema definitions for the gcp.plugins.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=gcp.plugins.kubeflow.org
kfconfig.apps.kubeflow.org/v1alpha1
Package v1alpha1 contains API Schema definitions for the kfconfig.apps.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=kfconfig.apps.kubeflow.org //+kubebuilder:storageversion
Package v1alpha1 contains API Schema definitions for the kfconfig.apps.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=kfconfig.apps.kubeflow.org //+kubebuilder:storageversion
kfdef.apps.kubeflow.org/v1
Package v1 contains API Schema definitions for the kfdef.apps.kubeflow.org v1 API group +kubebuilder:object:generate=true +groupName=kfdef.apps.kubeflow.org
Package v1 contains API Schema definitions for the kfdef.apps.kubeflow.org v1 API group +kubebuilder:object:generate=true +groupName=kfdef.apps.kubeflow.org
kfupdate.apps.kubeflow.org/v1alpha1
Package v1alpha1 contains API Schema definitions for the kfupdate.apps.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=kfupdate.apps.kubeflow.org
Package v1alpha1 contains API Schema definitions for the kfupdate.apps.kubeflow.org v1alpha1 API group +kubebuilder:object:generate=true +groupName=kfupdate.apps.kubeflow.org
controllers
pkg
kfapp
Package kfdef
Package kfdef
kfapp/coordinator/fake
package fake provides a fake implementation of the coordinator for use in tests
package fake provides a fake implementation of the coordinator for use in tests
kfapp/gcp/fake
package fake provides a fake implementation of the GCP Plugin
package fake provides a fake implementation of the GCP Plugin
kfconfig
Package v1alpha1 contains API Schema definitions for the kfdef v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/kfctl/v3/pkg/kfconfig +k8s:defaulter-gen=TypeMeta +groupName=kfconfig.apps.kubeflow.org +kubebuilder:storageversion
Package v1alpha1 contains API Schema definitions for the kfdef v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubeflow/kfctl/v3/pkg/kfconfig +k8s:defaulter-gen=TypeMeta +groupName=kfconfig.apps.kubeflow.org +kubebuilder:storageversion
kfconfig/awsplugin
Package v1alpha1 contains API Schema definitions for the KfAwsPlugin v1alpha1.
Package v1alpha1 contains API Schema definitions for the KfAwsPlugin v1alpha1.
kfconfig/gcpplugin
Package v1alpha1 contains API Schema definitions for the KfGcpPlugin v1alpha1.
Package v1alpha1 contains API Schema definitions for the KfGcpPlugin v1alpha1.
kfupgrade
Package kfupgrade
Package kfupgrade
tests
e2e

Jump to

Keyboard shortcuts

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