Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the kaito v1alpha1 API group +kubebuilder:object:generate=true +k8s:defaulter-gen=TypeMeta +groupName=kaito.sh
Index ¶
- Constants
- Variables
- type ConditionType
- type GPUConfig
- type InferenceSpec
- type ModelImageAccessMode
- type ModelName
- type PresetMeta
- type PresetOptions
- type PresetSpec
- type ResourceSpec
- type Workspace
- func (in *Workspace) DeepCopy() *Workspace
- func (in *Workspace) DeepCopyInto(out *Workspace)
- func (in *Workspace) DeepCopyObject() runtime.Object
- func (w *Workspace) SetDefaults(_ context.Context)
- func (w *Workspace) SupportedVerbs() []admissionregistrationv1.OperationType
- func (w *Workspace) Validate(ctx context.Context) (errs *apis.FieldError)
- type WorkspaceList
- type WorkspaceStatus
Constants ¶
const ( // WorkspaceConditionTypeMachineStatus is the state when checking machine status. WorkspaceConditionTypeMachineStatus = ConditionType("MachineReady") // WorkspaceConditionTypeResourceStatus is the state when Resource has been created. WorkspaceConditionTypeResourceStatus = ConditionType("ResourceReady") // WorkspaceConditionTypeInferenceStatus is the state when Inference has been created. WorkspaceConditionTypeInferenceStatus = ConditionType("InferenceReady") //WorkspaceConditionTypeDeleting is the Workspace state when starts to get deleted. WorkspaceConditionTypeDeleting = ConditionType("WorkspaceDeleting") //WorkspaceConditionTypeReady is the Workspace state that summarize all operations' state. WorkspaceConditionTypeReady ConditionType = ConditionType("WorkspaceReady") )
const ( // KAITOPrefix Kubernetes Data Mining prefix. KAITOPrefix = "kaito.sh/" // AnnotationEnableLB determines whether kaito creates LoadBalancer type service for testing. AnnotationEnableLB = KAITOPrefix + "enablelb" // LabelWorkspaceName is the label for workspace name. LabelWorkspaceName = KAITOPrefix + "workspace" // LabelWorkspaceName is the label for workspace namespace. LabelWorkspaceNamespace = KAITOPrefix + "workspacenamespace" )
const ( N_SERIES_PREFIX = "Standard_N" D_SERIES_PREFIX = "Standard_D" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "kaito.sh", Version: "v1alpha1"} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} )
var SupportedGPUConfigs = map[string]GPUConfig{ "Standard_NC6": {SKU: "Standard_NC6", GPUCount: 1, GPUMem: 12, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia470CudaDriver"}, "Standard_NC12": {SKU: "Standard_NC12", GPUCount: 2, GPUMem: 24, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia470CudaDriver"}, "Standard_NC24": {SKU: "Standard_NC24", GPUCount: 4, GPUMem: 48, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia470CudaDriver"}, "Standard_NC24r": {SKU: "Standard_NC24r", GPUCount: 4, GPUMem: 48, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia470CudaDriver"}, "Standard_NV6": {SKU: "Standard_NV6", GPUCount: 1, GPUMem: 8, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV12": {SKU: "Standard_NV12", GPUCount: 2, GPUMem: 16, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV24": {SKU: "Standard_NV24", GPUCount: 4, GPUMem: 32, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV12s_v3": {SKU: "Standard_NV12s_v3", GPUCount: 1, GPUMem: 8, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV24s_v3": {SKU: "Standard_NV24s_v3", GPUCount: 2, GPUMem: 16, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV48s_v3": {SKU: "Standard_NV48s_v3", GPUCount: 4, GPUMem: 32, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_ND6s": {SKU: "Standard_ND6s", GPUCount: 1, GPUMem: 24, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_ND12s": {SKU: "Standard_ND12s", GPUCount: 2, GPUMem: 48, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_ND24s": {SKU: "Standard_ND24s", GPUCount: 4, GPUMem: 96, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_ND24rs": {SKU: "Standard_ND24rs", GPUCount: 4, GPUMem: 96, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC6s_v2": {SKU: "Standard_NC6s_v2", GPUCount: 1, GPUMem: 16, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC12s_v2": {SKU: "Standard_NC12s_v2", GPUCount: 2, GPUMem: 32, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC24s_v2": {SKU: "Standard_NC24s_v2", GPUCount: 4, GPUMem: 64, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC24rs_v2": {SKU: "Standard_NC24rs_v2", GPUCount: 4, GPUMem: 64, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC6s_v3": {SKU: "Standard_NC6s_v3", GPUCount: 1, GPUMem: 16, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC12s_v3": {SKU: "Standard_NC12s_v3", GPUCount: 2, GPUMem: 32, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC24s_v3": {SKU: "Standard_NC24s_v3", GPUCount: 4, GPUMem: 64, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC24rs_v3": {SKU: "Standard_NC24rs_v3", GPUCount: 4, GPUMem: 64, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_ND40rs_v2": {SKU: "Standard_ND40rs_v2", GPUCount: 8, GPUMem: 256, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC4as_T4_v3": {SKU: "Standard_NC4as_T4_v3", GPUCount: 1, GPUMem: 16, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC8as_T4_v3": {SKU: "Standard_NC8as_T4_v3", GPUCount: 1, GPUMem: 16, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC16as_T4_v3": {SKU: "Standard_NC16as_T4_v3", GPUCount: 1, GPUMem: 16, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC64as_T4_v3": {SKU: "Standard_NC64as_T4_v3", GPUCount: 4, GPUMem: 64, SupportedOS: []string{"Mariner", "Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_ND96asr_v4": {SKU: "Standard_ND96asr_v4", GPUCount: 8, GPUMem: 320, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_ND96amsr_A100_v4": {SKU: "Standard_ND96amsr_A100_v4", GPUCount: 8, GPUMem: 640, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC24ads_A100_v4": {SKU: "Standard_NC24ads_A100_v4", GPUCount: 1, GPUMem: 80, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC48ads_A100_v4": {SKU: "Standard_NC48ads_A100_v4", GPUCount: 2, GPUMem: 160, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NC96ads_A100_v4": {SKU: "Standard_NC96ads_A100_v4", GPUCount: 4, GPUMem: 320, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia525CudaDriver"}, "Standard_NV6ads_A10_v5": {SKU: "Standard_NV6ads_A10_v5", GPUCount: 1, GPUMem: 4, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV12ads_A10_v5": {SKU: "Standard_NV12ads_A10_v5", GPUCount: 1, GPUMem: 8, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV18ads_A10_v5": {SKU: "Standard_NV18ads_A10_v5", GPUCount: 1, GPUMem: 12, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV36ads_A10_v5": {SKU: "Standard_NV36ads_A10_v5", GPUCount: 1, GPUMem: 24, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV36adms_A10_v5": {SKU: "Standard_NV36adms_A10_v5", GPUCount: 1, GPUMem: 24, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, "Standard_NV72ads_A10_v5": {SKU: "Standard_NV72ads_A10_v5", GPUCount: 2, GPUMem: 48, SupportedOS: []string{"Ubuntu"}, GPUDriver: "Nvidia510GridDriver"}, }
Functions ¶
This section is empty.
Types ¶
type GPUConfig ¶ added in v0.1.0
func (*GPUConfig) DeepCopy ¶ added in v0.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUConfig.
func (*GPUConfig) DeepCopyInto ¶ added in v0.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InferenceSpec ¶
type InferenceSpec struct { // Preset describles the model that will be deployed with preset configurations. // +optional Preset *PresetSpec `json:"preset,omitempty"` // Template specifies the Pod template used to run the inference service. Users can specify custom Pod settings // if the preset configurations cannot meet the requirements. Note that if Preset is specified, Template should not // be specified and vice versa. // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // +optional Template *v1.PodTemplateSpec `json:"template,omitempty"` }
func (*InferenceSpec) DeepCopy ¶
func (in *InferenceSpec) DeepCopy() *InferenceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferenceSpec.
func (*InferenceSpec) DeepCopyInto ¶
func (in *InferenceSpec) DeepCopyInto(out *InferenceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelImageAccessMode ¶
type ModelImageAccessMode string
+kubebuilder:validation:Enum=public;private
const ( ModelImageAccessModePublic ModelImageAccessMode = "public" ModelImageAccessModePrivate ModelImageAccessMode = "private" )
type PresetMeta ¶
type PresetMeta struct { // Name of the supported models with preset configurations. Name ModelName `json:"name"` // AccessMode specifies whether the containerized model image is accessible via public registry // or private registry. This field defaults to "public" if not specified. // If this field is "private", user needs to provide the private image information in PresetOptions. // +bebuilder:default:="public" // +optional AccessMode ModelImageAccessMode `json:"accessMode,omitempty"` }
func (*PresetMeta) DeepCopy ¶
func (in *PresetMeta) DeepCopy() *PresetMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PresetMeta.
func (*PresetMeta) DeepCopyInto ¶
func (in *PresetMeta) DeepCopyInto(out *PresetMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PresetOptions ¶
type PresetOptions struct { // Image is the name of the containerized model image. // +optional Image string `json:"image,omitempty"` // ImagePullSecrets is a list of secret names in the same namespace used for pulling the image. // +optional ImagePullSecrets []string `json:"imagePullSecrets,omitempty"` }
func (*PresetOptions) DeepCopy ¶
func (in *PresetOptions) DeepCopy() *PresetOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PresetOptions.
func (*PresetOptions) DeepCopyInto ¶
func (in *PresetOptions) DeepCopyInto(out *PresetOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PresetSpec ¶
type PresetSpec struct { PresetMeta `json:",inline"` // +optional PresetOptions `json:"presetOptions,omitempty"` }
PresetSpec provides the information for rendering preset configurations to run the model inference service.
func (*PresetSpec) DeepCopy ¶
func (in *PresetSpec) DeepCopy() *PresetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PresetSpec.
func (*PresetSpec) DeepCopyInto ¶
func (in *PresetSpec) DeepCopyInto(out *PresetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec struct { // Count is the required number of GPU nodes. // +optional // +kubebuilder:default:=1 Count *int `json:"count,omitempty"` // InstanceType specifies the GPU node SKU. // This field defaults to "Standard_NC12s_v3" if not specified. // +optional // +kubebuilder:default:="Standard_NC12s_v3" InstanceType string `json:"instanceType,omitempty"` // LabelSelector specifies the required labels for the GPU nodes. LabelSelector *metav1.LabelSelector `json:"labelSelector"` // PreferredNodes is an optional node list specified by the user. // If a node in the list does not have the required labels or // the required instanceType, it will be ignored. // +optional PreferredNodes []string `json:"preferredNodes,omitempty"` }
ResourceSpec desicribes the resource requirement of running the workload. If the number of nodes in the cluster that meet the InstanceType and LabelSelector requirements is small than the Count, controller will provision new nodes before deploying the workload. The final list of nodes used to run the workload is presented in workspace Status.
func (*ResourceSpec) DeepCopy ¶
func (in *ResourceSpec) DeepCopy() *ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (*ResourceSpec) DeepCopyInto ¶
func (in *ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workspace ¶
type Workspace struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Resource ResourceSpec `json:"resource,omitempty"` Inference InferenceSpec `json:"inference,omitempty"` Status WorkspaceStatus `json:"status,omitempty"` }
Workspace is the Schema for the workspaces API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=workspaces,scope=Namespaced,categories=workspace,shortName={wk,wks} +kubebuilder:storageversion +kubebuilder:printcolumn:name="Instance",type="string",JSONPath=".resource.instanceType",description="" +kubebuilder:printcolumn:name="ResourceReady",type="string",JSONPath=".status.conditions[?(@.type==\"ResourceReady\")].status",description="" +kubebuilder:printcolumn:name="InferenceReady",type="string",JSONPath=".status.conditions[?(@.type==\"InferenceReady\")].status",description="" +kubebuilder:printcolumn:name="WorkspaceReady",type="string",JSONPath=".status.conditions[?(@.type==\"WorkspaceReady\")].status",description="" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description=""
func (*Workspace) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workspace.
func (*Workspace) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workspace) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Workspace) SetDefaults ¶
SetDefaults for the Workspace
func (*Workspace) SupportedVerbs ¶
func (w *Workspace) SupportedVerbs() []admissionregistrationv1.OperationType
type WorkspaceList ¶
type WorkspaceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Workspace `json:"items"` }
WorkspaceList contains a list of Workspace +kubebuilder:object:root=true
func (*WorkspaceList) DeepCopy ¶
func (in *WorkspaceList) DeepCopy() *WorkspaceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceList.
func (*WorkspaceList) DeepCopyInto ¶
func (in *WorkspaceList) DeepCopyInto(out *WorkspaceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkspaceList) DeepCopyObject ¶
func (in *WorkspaceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkspaceStatus ¶
type WorkspaceStatus struct { // WorkerNodes is the list of nodes chosen to run the workload based on the workspace resource requirement. // +optional WorkerNodes []string `json:"workerNodes,omitempty"` // Conditions report the current conditions of the workspace. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
WorkspaceStatus defines the observed state of Workspace
func (*WorkspaceStatus) DeepCopy ¶
func (in *WorkspaceStatus) DeepCopy() *WorkspaceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceStatus.
func (*WorkspaceStatus) DeepCopyInto ¶
func (in *WorkspaceStatus) DeepCopyInto(out *WorkspaceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.