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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Index ¶
Constants ¶
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" )
const ( MMTypeConstraintsKey = "type_constraints" MMDataPlaneConfigKey = "dataplane_api_config" )
const ( ModelsDir string = "/models" ModelDirScale float64 = 1.5 )
const ( TLSSecretCertKey = "tls.crt" TLSSecretKeyKey = "tls.key" TLSClientCertKey = "ca.crt" )
const (
EtcdSecretKey = "etcd_connection" //TODO probably move this const
)
const ModelMeshEtcdPrefix = "mm"
const ModelTypeLabelThatNoRuntimeSupports = "_no_runtime"
Variables ¶
var StorageSecretName string
Functions ¶
func ValidateEndpoint ¶
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
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
type StringSet ¶
type StringSet map[string]struct{}
func GetServingRuntimeSupportedModelTypeLabelSet ¶
func GetServingRuntimeSupportedModelTypeLabelSet(rt *api.ServingRuntime) StringSet