Documentation
¶
Index ¶
- Constants
- func Add(mgr manager.Manager, runtimeConfig config.RuntimeConfig) error
- func NewCondition(condType string, status metav1.ConditionStatus, reason, msg string) metav1.Condition
- func RemoveInstanceFromList(slice []string, strToRemove string) []string
- func StringInSlice(slice []string, str string) bool
- type ModelAdapterReconciler
- type URLConfig
Constants ¶
View Source
const ( ModelIdentifierKey = constants.ModelLabelName ModelAdapterKey = "adapter.model.aibrix.ai/name" ModelAdapterFinalizer = "adapter.model.aibrix.ai/finalizer" ModelAdapterPodTemplateLabelKey = "adapter.model.aibrix.ai/enabled" ModelAdapterPodTemplateLabelValue = "true" // ModelAdapterInitializedReason is added in model adapter when it comes into the reconciliation loop. ModelAdapterInitializedReason = "ModelAdapterPending" // FailedServiceCreateReason is added in a model adapter when it cannot create a new service. FailedServiceCreateReason = "ServiceCreateError" // FailedEndpointSliceCreateReason is added in a model adapter when it cannot create a new replica set. FailedEndpointSliceCreateReason = "EndpointSliceCreateError" // ModelAdapterLoadingErrorReason is added in a model adapter when it cannot be loaded in an engine pod. ModelAdapterLoadingErrorReason = "ModelAdapterLoadingError" // ValidationFailedReason is added when model adapter object fails the validation ValidationFailedReason = "ValidationFailed" // StableInstanceFoundReason is added if there's stale pod and instance has been deleted successfully. StableInstanceFoundReason = "StableInstanceFound" // ConditionNotReason is added when there's no condition found in the cluster. ConditionNotReason = "ConditionNotFound" // ModelAdapterAvailable is added in a ModelAdapter when it has replicas available. ModelAdapterAvailable = "ModelAdapterAvailable" ModelAdapterUnavailable = "ModelAdapterUnavailable" // Inference Service path and ports DefaultInferenceEnginePort = "8000" DefaultDebugInferenceEnginePort = "30081" DefaultRuntimeAPIPort = "8080" ModelListPath = "/v1/models" ModelListRuntimeAPIPath = "/v1/models" LoadLoraAdapterPath = "/v1/load_lora_adapter" LoadLoraRuntimeAPIPath = "/v1/lora_adapter/load" UnloadLoraAdapterPath = "/v1/unload_lora_adapter" UnloadLoraRuntimeAPIPath = "/v1/lora_adapter/unload" // DefaultModelAdapterSchedulerPolicy is the default scheduler policy for ModelAdapter Controller. DefaultModelAdapterSchedulerPolicy = "leastAdapters" )
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(mgr manager.Manager, runtimeConfig config.RuntimeConfig) error
Add creates a new ModelAdapter Controller and adds it to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func NewCondition ¶
func NewCondition(condType string, status metav1.ConditionStatus, reason, msg string) metav1.Condition
NewCondition creates a new condition.
func RemoveInstanceFromList ¶
RemoveInstanceFromList removes a string from a slice of strings
func StringInSlice ¶
Types ¶
type ModelAdapterReconciler ¶
type ModelAdapterReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder // PodLister is able to list/get pods from a shared informer's cache store PodLister corelisters.PodLister // ServiceLister is able to list/get services from a shared informer's cache store ServiceLister corelisters.ServiceLister // EndpointSliceLister is able to list/get services from a shared informer's cache store EndpointSliceLister discoverylisters.EndpointSliceLister RuntimeConfig config.RuntimeConfig // contains filtered or unexported fields }
ModelAdapterReconciler reconciles a ModelAdapter object
func (*ModelAdapterReconciler) DoReconcile ¶
func (r *ModelAdapterReconciler) DoReconcile(ctx context.Context, req ctrl.Request, instance *modelv1alpha1.ModelAdapter) (ctrl.Result, error)
Click to show internal directories.
Click to hide internal directories.