v1

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the kubeai v1 API group +kubebuilder:object:generate=true +groupName=kubeai.org

Index

Constants

View Source
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"
)
View Source
const (
	ModelFeatureTextGeneration = "TextGeneration"
	ModelFeatureTextEmbedding  = "TextEmbedding"
)
View Source
const (
	OLlamaEngine = "OLlama"
	VLLMEngine   = "VLLM"
)

Variables

View Source
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

func (in *Model) DeepCopy() *Model

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Model.

func (*Model) DeepCopyInto

func (in *Model) DeepCopyInto(out *Model)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Model) DeepCopyObject

func (in *Model) DeepCopyObject() runtime.Object

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

func (in *ModelList) DeepCopy() *ModelList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelList.

func (*ModelList) DeepCopyInto

func (in *ModelList) DeepCopyInto(out *ModelList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ModelList) DeepCopyObject

func (in *ModelList) DeepCopyObject() runtime.Object

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

func (in *ModelSpec) DeepCopy() *ModelSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSpec.

func (*ModelSpec) DeepCopyInto

func (in *ModelSpec) DeepCopyInto(out *ModelSpec)

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

type ModelStatusReplicas struct {
	All   int32 `json:"all"`
	Ready int32 `json:"ready"`
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL