modelmesh

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModelMeshContainerName = "mm"
	RESTProxyContainerName = "rest-proxy"

	GrpcPortEnvVar         = "INTERNAL_GRPC_PORT"
	ServeGrpcPortEnvVar    = "INTERNAL_SERVING_GRPC_PORT"
	GrpcUdsPathEnvVar      = "INTERNAL_GRPC_SOCKET_PATH"
	ServeGrpcUdsPathEnvVar = "INTERNAL_SERVING_GRPC_SOCKET_PATH"

	EtcdSecretKey = "etcd_connection"
	EtcdVolume    = "etcd-config"

	ModelsDirVolume = "models-dir"
	SocketVolume    = "domain-socket"

	ConfigStorageMount = "storage-config"

	//The name of the puller container
	PullerContainerName = "puller"

	//The env variable puller uses to configure it's own listen port
	PullerEnvListenPort = "PORT"

	//The env variable puller uses to configure the target model serving port
	PullerEnvModelServerEndpoint = "MODEL_SERVER_ENDPOINT"

	//The env variable puller uses to configure the models dir
	PullerEnvModelDir = "ROOT_MODEL_DIR"

	//The env variable puller uses to configure the config dir (secrets)
	PullerEnvStorageConfigDir = "STORAGE_CONFIG_DIR"

	//The env variable puller uses to configure the pvc dir (secrets)
	PullerEnvPVCDir = "PVC_MOUNTS_DIR"

	//The puller default port number
	PullerPortNumber = 8086

	//The puller model mount path
	PullerModelPath = "/models"

	//The puller model PVC path
	DefaultPVCMountsDir = "/pvc_mounts"

	//The puller model config path
	PullerConfigPath = "/storage-config"

	InternalConfigMapName = "tc-config"
)
View Source
const (
	MMTypeConstraintsKey = "type_constraints"
	MMDataPlaneConfigKey = "dataplane_api_config"
)
View Source
const (
	ModelsDir     string  = "/models"
	PVCRootDir    string  = "/pvc_mounts"
	ModelDirScale float64 = 1.5
)
View Source
const (
	TLSSecretCertKey = "tls.crt"
	TLSSecretKeyKey  = "tls.key"

	TLSClientCertKey = "ca.crt"
)
View Source
const ModelMeshEtcdPrefix = "mm"
View Source
const ModelTypeLabelThatNoRuntimeSupports = "_no_runtime"

Variables

View Source
var StorageSecretName string
View Source
var (
	Union = kserveutils.Union
)

Functions

func GetPredictorTypeLabel added in v0.9.0

func GetPredictorTypeLabel(p *api.Predictor) string

func GetServingRuntimeLabelSet added in v0.9.0

func GetServingRuntimeLabelSet(rt *kserveapi.ServingRuntimeSpec, restProxyEnabled bool, rtName string) sets.Set[string]

func GetServingRuntimeLabelSets added in v0.9.0

func GetServingRuntimeLabelSets(rt *kserveapi.ServingRuntimeSpec, restProxyEnabled bool, rtName string) (
	mtLabels sets.Set[string], pvLabels sets.Set[string], rtLabel string)

func ValidateEndpoint

func ValidateEndpoint(s string) (string, error)

Types

type ClusterConfig

type ClusterConfig struct {
	SRSpecs map[string]*kserveapi.ServingRuntimeSpec
	Scheme  *runtime.Scheme
}

A ClusterConfig represents the configuration shared across a logical model mesh cluster

func (ClusterConfig) Reconcile added in v0.8.0

func (cc ClusterConfig) Reconcile(ctx context.Context, namespace string, cl client.Client, cfg *config.Config) error

type Deployment

type Deployment struct {
	ServiceName        string
	ServicePort        uint16
	Name               string
	Namespace          string
	Owner              mf.Owner
	SRSpec             *kserveapi.ServingRuntimeSpec
	DefaultVModelOwner string
	Log                logr.Logger
	Metrics            bool
	PrometheusPort     uint16
	PrometheusScheme   string
	PayloadProcessors  string
	ModelMeshImage     string
	ModelMeshResources *corev1.ResourceRequirements
	RESTProxyEnabled   bool
	RESTProxyImage     string
	RESTProxyResources *corev1.ResourceRequirements
	RESTProxyPort      uint16
	PVCs               []string
	// internal fields used when templating
	ModelMeshLimitCPU          string
	ModelMeshRequestsCPU       string
	ModelMeshLimitMemory       string
	ModelMeshRequestsMemory    string
	ModelMeshAdditionalEnvVars []corev1.EnvVar
	// end internal fields
	PullerImage         string
	PullerImageCommand  []string
	PullerResources     *corev1.ResourceRequirements
	Replicas            uint16
	Port                uint16
	TLSSecretName       string
	TLSClientAuth       string
	EtcdSecretName      string
	ServiceAccountName  string
	GrpcMaxMessageSize  int
	AnnotationConfigMap *corev1.ConfigMap
	AnnotationsMap      map[string]string
	LabelsMap           map[string]string
	ImagePullSecrets    []corev1.LocalObjectReference
	EnableAccessLogging bool
	Client              client.Client
}

Models a deployment

func (*Deployment) Apply

func (m *Deployment) Apply(ctx context.Context) error

func (*Deployment) Delete

func (m *Deployment) Delete(ctx context.Context, client client.Client) error

type Endpoint

type Endpoint interface {
}

func ParseEndpoint

func ParseEndpoint(s string) (Endpoint, error)

type TCPEndpoint

type TCPEndpoint struct {
	Endpoint
	Port string
}

type UnixEndpoint

type UnixEndpoint struct {
	Endpoint

	// The file system path which may be a file
	Path string

	// The file system directory which contains the
	// file.
	ParentPath string
}

Jump to

Keyboard shortcuts

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