Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the kubeai v1 API group +kubebuilder:object:generate=true +groupName=kubeai.org
Index ¶
Constants ¶
const ( PodModelLabel = "model" ModelFeatureLabelDomain = "features.kubeai.org" // ModelPodIPAnnotation is the annotation key used to specify an IP // to use for the model Pod instead of the IP address in the status of the Pod. // Use in conjunction with --allow-pod-address-override for development purposes. ModelPodIPAnnotation = "model-pod-ip" ModelPodPortAnnotation = "model-pod-port" )
const ( ModelFeatureTextGeneration = "TextGeneration" ModelFeatureTextEmbedding = "TextEmbedding" )
const ( OLlamaEngine = "OLlama" VLLMEngine = "VLLM" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "kubeai.org", Version: "v1"} // 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 ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ModelSpec `json:"spec,omitempty"` Status ModelStatus `json:"status,omitempty"` }
Model is the Schema for the models API
func (*Model) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Model.
func (*Model) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Model) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelFeature ¶
type ModelFeature string
+kubebuilder:validation:Enum=TextGeneration;TextEmbedding
type ModelList ¶
type ModelList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Model `json:"items"` }
ModelList contains a list of Model
func (*ModelList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelList.
func (*ModelList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelSpec ¶
type ModelSpec struct { Owner string `json:"owner"` URL string `json:"url"` Features []ModelFeature `json:"features"` // +kubebuilder:validation:Enum=OLlama;VLLM Engine string `json:"engine"` Replicas *int32 `json:"replicas,omitempty"` MinReplicas int32 `json:"minReplicas"` MaxReplicas int32 `json:"maxReplicas"` // ResourceProfile maps to specific pre-configured resources. ResourceProfile string `json:"resourceProfile,omitempty"` // Resources to be allocated to the server process. // Will be set from the ResourceProfile if provided. Resources *corev1.ResourceRequirements `json:"resources,omitempty"` // NodeSelector to be added to the server process. // Will be set from the ResourceProfile if provided. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Args to be added to the server process. Args []string `json:"args,omitempty"` // Env variables to be added to the server process. Env map[string]string `json:"env,omitempty"` }
ModelSpec defines the desired state of Model
func (*ModelSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec.
func (*ModelSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelStatus ¶
type ModelStatus struct {
Replicas ModelStatusReplicas `json:"replicas,omitempty"`
}
ModelStatus defines the observed state of Model
func (*ModelStatus) DeepCopy ¶
func (in *ModelStatus) DeepCopy() *ModelStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelStatus.
func (*ModelStatus) DeepCopyInto ¶
func (in *ModelStatus) DeepCopyInto(out *ModelStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelStatusReplicas ¶
func (*ModelStatusReplicas) DeepCopy ¶
func (in *ModelStatusReplicas) DeepCopy() *ModelStatusReplicas
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelStatusReplicas.
func (*ModelStatusReplicas) DeepCopyInto ¶
func (in *ModelStatusReplicas) DeepCopyInto(out *ModelStatusReplicas)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.