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.
Index ¶
- Constants
- Variables
- func Hash(predictorSpec *api.PredictorSpec) string
- type MMServiceMap
- type ModelKeyInfo
- type PredictorReconciler
- func (pr *PredictorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (pr *PredictorReconciler) ReconcilePredictor(ctx context.Context, nname types.NamespacedName, sourceId string, ...) (ctrl.Result, error)
- func (pr *PredictorReconciler) SetupWithManager(mgr ctrl.Manager, eventStream *mmesh.ModelMeshEventStream, ...) error
- type ServiceReconciler
- type ServingRuntimeReconciler
Constants ¶
const ( InferenceServiceCRSourceId = "isvc" PredictorCRSourceId = "ksp" )
const ( GrpcRequestTimeout = 10 * time.Second K8sStatusUpdateTimeout = 10 * time.Second )
const ( // The amount of time failed requests are queued before reattempting DefaultRequeueTime = 5 * time.Second )
Variables ¶
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
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) 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) 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
RegistryMap map[string]predictor_source.PredictorRegistry
// contains filtered or unexported fields
}
ServingRuntimeReconciler reconciles a ServingRuntime object
func (*ServingRuntimeReconciler) SetupWithManager ¶
func (r *ServingRuntimeReconciler) SetupWithManager(mgr ctrl.Manager, watchInferenceServices bool, sourcePluginEvents <-chan event.GenericEvent) error