kserve

package
v2.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package kserve provides utility functions to config Kserve as the Controller for serving ML models on arbitrary frameworks +groupName=datasciencecluster.opendatahub.io

Index

Constants

View Source
const (
	KserveConfigMapName string = "inferenceservice-config"
)

Variables

View Source
var (
	ComponentName          = "kserve"
	Path                   = deploy.DefaultManifestPath + "/" + ComponentName + "/overlays/odh"
	DependentComponentName = "odh-model-controller"
	DependentPath          = deploy.DefaultManifestPath + "/" + DependentComponentName + "/base"
	ServiceMeshOperator    = "servicemeshoperator"
	ServerlessOperator     = "serverless-operator"
)
View Source
var Resources = struct {
	// ServiceMeshDir is the path to the Service Mesh templates.
	ServiceMeshDir string
	// InstallDir is the path to the Serving install templates.
	InstallDir string
	// GatewaysDir is the path to the Serving Istio gateways templates.
	GatewaysDir string
	// Location specifies the file system that contains the templates to be used.
	Location fs.FS
	// BaseDir is the path to the base of the embedded FS
	BaseDir string
}{
	ServiceMeshDir: path.Join(baseDir, "servicemesh"),
	InstallDir:     path.Join(baseDir, "serving-install"),
	GatewaysDir:    path.Join(baseDir, "servicemesh", "routing"),
	Location:       kserveEmbeddedFS,
	BaseDir:        baseDir,
}

Functions

func PopulateComponentSettings added in v2.7.0

func PopulateComponentSettings(k *Kserve) feature.Action

Types

type DefaultDeploymentMode added in v2.9.0

type DefaultDeploymentMode string

+kubebuilder:validation:Pattern=`^(Serverless|RawDeployment)$`

var (
	// Serverless will be used as the default deployment mode for Kserve. This requires Serverless and ServiceMesh operators configured as dependencies.
	Serverless DefaultDeploymentMode = "Serverless"
	// RawDeployment will be used as the default deployment mode for Kserve.
	RawDeployment DefaultDeploymentMode = "RawDeployment"
)

type Kserve

type Kserve struct {
	components.Component `json:""`
	// Serving configures the KNative-Serving stack used for model serving. A Service
	// Mesh (Istio) is prerequisite, since it is used as networking layer.
	Serving infrav1.ServingSpec `json:"serving,omitempty"`
	// Configures the default deployment mode for Kserve. This can be set to 'Serverless' or 'RawDeployment'.
	// The value specified in this field will be used to set the default deployment mode in the 'inferenceservice-config' configmap for Kserve.
	// This field is optional. If no default deployment mode is specified, Kserve will use Serverless mode.
	// +kubebuilder:validation:Enum=Serverless;RawDeployment
	DefaultDeploymentMode DefaultDeploymentMode `json:"defaultDeploymentMode,omitempty"`
}

Kserve struct holds the configuration for the Kserve component. +kubebuilder:object:generate=true

func (*Kserve) Cleanup added in v2.7.0

func (k *Kserve) Cleanup(ctx context.Context, cli client.Client, instance *dsciv1.DSCInitializationSpec) error

func (*Kserve) DeepCopy added in v2.7.0

func (in *Kserve) DeepCopy() *Kserve

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kserve.

func (*Kserve) DeepCopyInto

func (in *Kserve) DeepCopyInto(out *Kserve)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Kserve) GetComponentName

func (k *Kserve) GetComponentName() string

func (*Kserve) OverrideManifests added in v2.2.0

func (k *Kserve) OverrideManifests(ctx context.Context, _ string) error

func (*Kserve) ReconcileComponent

func (k *Kserve) ReconcileComponent(ctx context.Context, cli client.Client,
	logger logr.Logger, owner metav1.Object, dscispec *dsciv1.DSCInitializationSpec, platform cluster.Platform, _ bool) error

Jump to

Keyboard shortcuts

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