controllers

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 43 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	InferenceServiceCRSourceId = "isvc"
	PredictorCRSourceId        = "ksp"
)
View Source
const (
	GrpcRequestTimeout     = 10 * time.Second
	K8sStatusUpdateTimeout = 10 * time.Second
)
View Source
const (
	// The amount of time failed requests are queued before reattempting
	DefaultRequeueTime = 5 * time.Second
)
View Source
const (
	StoragePVCType = "pvc"
)

Variables

View Source
var RequeueResult = ctrl.Result{RequeueAfter: DefaultRequeueTime}

Functions

func Hash

func Hash(predictorSpec *api.PredictorSpec) string

Hash returns a 10-character hash string of the spec

Types

type MMServiceMap added in v0.8.0

type MMServiceMap sync.Map // string->*mmesh.MMService

This is a map in preparation for multi-namespace support

func (*MMServiceMap) Delete added in v0.8.0

func (m *MMServiceMap) Delete(namespace string)

func (*MMServiceMap) Get added in v0.8.0

func (m *MMServiceMap) Get(namespace string) *mmesh.MMService

func (*MMServiceMap) GetOrCreate added in v0.8.0

func (m *MMServiceMap) GetOrCreate(namespace string, tlsConfig mmesh.TLSConfigLookup) (*mmesh.MMService, bool)

type ModelKeyInfo

type ModelKeyInfo struct {
	StorageKey    *string           `json:"storage_key,omitempty"`
	StorageParams map[string]string `json:"storage_params,omitempty"`
	ModelType     *api.ModelType    `json:"model_type,omitempty"`
	SchemaPath    *string           `json:"schema_path,omitempty"`
}

passed in ModelInfo.Key field of registration requests

type PredictorReconciler

type PredictorReconciler struct {
	client.Client
	Log        logr.Logger
	MMServices *MMServiceMap

	RegistryLookup map[string]predictor_source.PredictorRegistry
}

PredictorReconciler reconciles Predictors

func (*PredictorReconciler) Reconcile

func (pr *PredictorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*PredictorReconciler) ReconcilePredictor

func (pr *PredictorReconciler) ReconcilePredictor(ctx context.Context, nname types.NamespacedName,
	sourceId string, registry predictor_source.PredictorRegistry) (ctrl.Result, error)

func (*PredictorReconciler) SetupWithManager

func (pr *PredictorReconciler) SetupWithManager(mgr ctrl.Manager, eventStream *mmesh.ModelMeshEventStream,
	watchInferenceServices bool, sourcePluginEvents <-chan event.GenericEvent) error

type ServiceReconciler

type ServiceReconciler struct {
	client.Client
	Log                  logr.Logger
	Scheme               *runtime.Scheme
	ConfigProvider       *config.ConfigProvider
	ConfigMapName        types.NamespacedName
	ControllerDeployment types.NamespacedName
	ClusterScope         bool

	MMServices       *MMServiceMap
	ModelEventStream *mmesh.ModelMeshEventStream

	ServiceMonitorCRDExists bool
}

ServiceReconciler reconciles a ServingRuntime object

func (*ServiceReconciler) Reconcile

func (r *ServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*ServiceReconciler) SetupWithManager

func (r *ServiceReconciler) SetupWithManager(mgr ctrl.Manager) error

type ServingRuntimeReconciler

type ServingRuntimeReconciler struct {
	client.Client
	Log                 logr.Logger
	Scheme              *runtime.Scheme
	ConfigProvider      *config.ConfigProvider
	ConfigMapName       types.NamespacedName
	ControllerName      string
	ControllerNamespace string
	// whether the controller has cluster scope permissions
	ClusterScope bool
	// whether the controller is enabled to read and watch ClusterServingRuntimes
	EnableCSRWatch bool
	// whether the controller is enabled to read and watch secrets
	EnableSecretWatch bool

	RegistryMap map[string]predictor_source.PredictorRegistry
	// contains filtered or unexported fields
}

ServingRuntimeReconciler reconciles a ServingRuntime object

func (*ServingRuntimeReconciler) Reconcile

func (*ServingRuntimeReconciler) SetupWithManager

func (r *ServingRuntimeReconciler) SetupWithManager(mgr ctrl.Manager,
	watchInferenceServices bool, sourcePluginEvents <-chan event.GenericEvent) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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