modelmesh

package
v0.7.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Copyright 2021 IBM Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	ModelMeshContainer = "mm"
	RESTProxyContainer = "rest-proxy"

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

	ConfigStorageMount = "storage-config"

	//The name of the puller container
	PullerContainer = "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 puller default port number
	PullerPortNumber = 8086

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

	//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"
	ModelDirScale float64 = 1.5
)
View Source
const (
	TLSSecretCertKey = "tls.crt"
	TLSSecretKeyKey  = "tls.key"

	TLSClientCertKey = "ca.crt"
)
View Source
const (
	EtcdSecretKey = "etcd_connection" //TODO probably move this const

)
View Source
const ModelMeshEtcdPrefix = "mm"
View Source
const ModelTypeLabelThatNoRuntimeSupports = "_no_runtime"

Variables

View Source
var StorageSecretName string

Functions

func GetPredictorModelTypeLabel

func GetPredictorModelTypeLabel(p *api.Predictor) string

func ValidateEndpoint

func ValidateEndpoint(s string) (string, error)

Types

type ClusterConfig

type ClusterConfig struct {
	Runtimes  *api.ServingRuntimeList
	Namespace string
	Scheme    *runtime.Scheme
}

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

func (ClusterConfig) Apply

func (cc ClusterConfig) Apply(ctx context.Context, owner metav1.Object, cl client.Client) error

type Deployment

type Deployment struct {
	ServiceName        string
	ServicePort        uint16
	Name               string
	Namespace          string
	Owner              *api.ServingRuntime
	DefaultVModelOwner string
	Log                logr.Logger
	Metrics            bool
	PrometheusPort     uint16
	PrometheusScheme   string
	ModelMeshImage     string
	ModelMeshResources *corev1.ResourceRequirements
	RESTProxyEnabled   bool
	RESTProxyImage     string
	RESTProxyResources *corev1.ResourceRequirements
	RESTProxyPort      uint16
	// internal fields used when templating
	ModelMeshLimitCPU       string
	ModelMeshRequestsCPU    string
	ModelMeshLimitMemory    string
	ModelMeshRequestsMemory string
	// 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
	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 StringSet

type StringSet map[string]struct{}

func GetServingRuntimeSupportedModelTypeLabelSet

func GetServingRuntimeSupportedModelTypeLabelSet(rt *api.ServingRuntime) StringSet

func (StringSet) Add

func (ss StringSet) Add(s string)

func (StringSet) Contains

func (ss StringSet) Contains(s string) bool

func (StringSet) ToSlice

func (ss StringSet) ToSlice() []string

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