Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the model v1alpha1 API group +kubebuilder:object:generate=true +groupName=model.aibrix.ai
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "model.aibrix.ai", Version: "v1alpha1"} // SchemeGroupVersion is group version used to register these objects. SchemeGroupVersion = GroupVersion // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Types ¶
type ModelAdapter ¶
type ModelAdapter struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ModelAdapterSpec `json:"spec,omitempty"`
Status ModelAdapterStatus `json:"status,omitempty"`
}
ModelAdapter is the Schema for the modeladapters API
func (*ModelAdapter) DeepCopy ¶
func (in *ModelAdapter) DeepCopy() *ModelAdapter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelAdapter.
func (*ModelAdapter) DeepCopyInto ¶
func (in *ModelAdapter) DeepCopyInto(out *ModelAdapter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelAdapter) DeepCopyObject ¶
func (in *ModelAdapter) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelAdapterConditionType ¶
type ModelAdapterConditionType string
const ( ModelAdapterConditionTypeInitialized ModelAdapterConditionType = "Initialized" ModelAdapterConditionTypeScheduled ModelAdapterConditionType = "Scheduled" ModelAdapterConditionTypeBound ModelAdapterConditionType = "Bound" ModelAdapterConditionTypeResourceCreated ModelAdapterConditionType = "ResourceCreated" ModelAdapterConditionReady ModelAdapterConditionType = "Ready" )
type ModelAdapterList ¶
type ModelAdapterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ModelAdapter `json:"items"`
}
ModelAdapterList contains a list of ModelAdapter
func (*ModelAdapterList) DeepCopy ¶
func (in *ModelAdapterList) DeepCopy() *ModelAdapterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelAdapterList.
func (*ModelAdapterList) DeepCopyInto ¶
func (in *ModelAdapterList) DeepCopyInto(out *ModelAdapterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelAdapterList) DeepCopyObject ¶
func (in *ModelAdapterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelAdapterPhase ¶
type ModelAdapterPhase string
ModelAdapterPhase is a string representation of the ModelAdapter lifecycle phase.
const ( // ModelAdapterPending means the CR has been created and that's the initial status ModelAdapterPending ModelAdapterPhase = "Pending" // ModelAdapterScheduled means the ModelAdapter is pending scheduling ModelAdapterScheduled ModelAdapterPhase = "Scheduled" // ModelAdapterBound means the controller loads ModelAdapter on a selected pod ModelAdapterBound ModelAdapterPhase = "Bound" // ModelAdapterResourceCreated means the model adapter owned resources have been created ModelAdapterResourceCreated ModelAdapterPhase = "ResourceCreated" // ModelAdapterRunning means ModelAdapter has been running on the pod ModelAdapterRunning ModelAdapterPhase = "Running" // ModelAdapterFailed means ModelAdapter has terminated in a failure ModelAdapterFailed ModelAdapterPhase = "Failed" // ModelAdapterUnknown means ModelAdapter clean up some stable resources ModelAdapterUnknown ModelAdapterPhase = "Unknown" // ModelAdapterScaled means ModelAdapter is scaled, could be scaling in or out. won't be enabled until we allow multiple replicas // TODO: not implemented yet. ModelAdapterScaled ModelAdapterPhase = "Scaled" )
type ModelAdapterSpec ¶
type ModelAdapterSpec struct {
// BaseModel is the identifier for the base model to which the ModelAdapter will be attached.
// +optional
BaseModel *string `json:"baseModel,omitempty"`
// PodSelector is a label query over pods that should match the ModelAdapter configuration.
// +kubebuilder:validation:Required
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"`
// SchedulerName is the name of the scheduler to use for scheduling the ModelAdapter.
// +optional
// +kubebuilder:default=default
SchedulerName string `json:"schedulerName,omitempty"`
// ArtifactURL is the address of the model artifact to be downloaded. Different protocol is supported like s3,gcs,huggingface
// +kubebuilder:validation:Required
ArtifactURL string `json:"artifactURL,omitempty"`
// CredentialsSecretRef points to the secret used to authenticate the artifact download requests
// +optional
CredentialsSecretRef *corev1.LocalObjectReference `json:"credentialsSecretRef,omitempty"`
// Replicas controls adapter distribution across pods:
// - nil (omitted): Load adapter on ALL matching pods (recommended)
// - 1: Load adapter on a single pod selected by the scheduler
// Only nil or 1 are supported. Other values will be rejected.
// +optional
// +kubebuilder:validation:Enum=1
Replicas *int32 `json:"replicas,omitempty"`
// Additional fields can be added here to customize the scheduling and deployment
// +optional
AdditionalConfig map[string]string `json:"additionalConfig,omitempty"`
}
ModelAdapterSpec defines the desired state of ModelAdapter
func (*ModelAdapterSpec) DeepCopy ¶
func (in *ModelAdapterSpec) DeepCopy() *ModelAdapterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelAdapterSpec.
func (*ModelAdapterSpec) DeepCopyInto ¶
func (in *ModelAdapterSpec) DeepCopyInto(out *ModelAdapterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelAdapterStatus ¶
type ModelAdapterStatus struct {
// Phase is a simple, high-level summary of where the ModelAdapter is in its lifecycle
// Phase maps to latest status.conditions.type
// +optional
Phase ModelAdapterPhase `json:"phase,omitempty"`
// Candidates is the total number of pods matching the selector (candidate pods for adapter loading)
// +optional
Candidates int32 `json:"candidates,omitempty"`
// ReadyReplicas is the number of adapter replicas successfully loaded and ready
// +optional
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// DesiredReplicas is the desired number of adapter replicas based on spec.replicas
// - If replicas is nil: equals candidates (load on all)
// - If replicas is 1: equals 1 (single pod)
// +optional
DesiredReplicas int32 `json:"desiredReplicas,omitempty"`
// Conditions represents the observation of a model adapter's current state.
// +patchMergeKey=type
// +patchStrategy=merge
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Instances lists all pod instances of ModelAdapter
// +optional
Instances []string `json:"instances,omitempty"`
}
ModelAdapterStatus defines the observed state of ModelAdapter
func (*ModelAdapterStatus) DeepCopy ¶
func (in *ModelAdapterStatus) DeepCopy() *ModelAdapterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelAdapterStatus.
func (*ModelAdapterStatus) DeepCopyInto ¶
func (in *ModelAdapterStatus) DeepCopyInto(out *ModelAdapterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.