Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the model v1alpha1 API group +kubebuilder:object:generate=true +groupName=model.aibrix.ai
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ModelAdapter
- type ModelAdapterConditionType
- type ModelAdapterList
- type ModelAdapterPhase
- type ModelAdapterSpec
- type ModelAdapterStatus
- type ModelClaim
- type ModelClaimConditionType
- type ModelClaimEngineConfig
- type ModelClaimInstance
- type ModelClaimList
- type ModelClaimPerGPU
- type ModelClaimPhase
- type ModelClaimSpec
- type ModelClaimStatus
- type ModelWarmup
- type ModelWarmupCustomAction
- type ModelWarmupImage
- type ModelWarmupImagePreload
- type ModelWarmupList
- type ModelWarmupMode
- type ModelWarmupNodesTarget
- type ModelWarmupPhase
- type ModelWarmupPolicies
- type ModelWarmupSpec
- type ModelWarmupStatus
- type ModelWarmupTarget
- type ModelWarmupTargetPhase
- type ModelWarmupTargetStatus
Constants ¶
const ( DefaultModelWarmupParallelism int32 = 8 DefaultModelWarmupJobTimeoutSeconds int64 = 1800 DefaultModelWarmupRetryLimit int32 = 2 DefaultModelWarmupTTLSecondsAfterFinished int32 = 3600 MaxModelWarmupTargets = 1000 MaxModelWarmupTargetDetails = 256 MaxModelWarmupDiagnosticLength = 1024 MaxModelWarmupTargetEntries = 32 MaxModelWarmupImages = 32 MaxModelWarmupPullSecrets = 32 MaxModelWarmupCommandElements = 64 MaxModelWarmupArgElements = 64 MaxModelWarmupCustomInitContainers = 32 MaxModelWarmupCustomContainers = 32 MaxModelWarmupCustomVolumes = 32 MaxModelWarmupCustomPullSecrets = 32 )
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.
type ModelClaim ¶ added in v0.8.0
type ModelClaim struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ModelClaimSpec `json:"spec,omitempty"`
Status ModelClaimStatus `json:"status,omitempty"`
}
ModelClaim is the Schema for the modelclaims API.
func (*ModelClaim) DeepCopy ¶ added in v0.8.0
func (in *ModelClaim) DeepCopy() *ModelClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelClaim.
func (*ModelClaim) DeepCopyInto ¶ added in v0.8.0
func (in *ModelClaim) DeepCopyInto(out *ModelClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelClaim) DeepCopyObject ¶ added in v0.8.0
func (in *ModelClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelClaimConditionType ¶ added in v0.8.0
type ModelClaimConditionType string
ModelClaimConditionType enumerates the condition types reported in status.
const ( ModelClaimConditionTypeInitialized ModelClaimConditionType = "Initialized" ModelClaimConditionTypeScheduled ModelClaimConditionType = "Scheduled" ModelClaimConditionTypeLoaded ModelClaimConditionType = "Loaded" ModelClaimConditionReady ModelClaimConditionType = "Ready" )
type ModelClaimEngineConfig ¶ added in v0.8.0
type ModelClaimEngineConfig struct {
// Args maps engine CLI flags to string values. Boolean flags should use
// an empty string value.
// +optional
Args map[string]string `json:"args,omitempty"`
}
ModelClaimEngineConfig describes engine-specific startup options.
func (*ModelClaimEngineConfig) DeepCopy ¶ added in v0.8.0
func (in *ModelClaimEngineConfig) DeepCopy() *ModelClaimEngineConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelClaimEngineConfig.
func (*ModelClaimEngineConfig) DeepCopyInto ¶ added in v0.8.0
func (in *ModelClaimEngineConfig) DeepCopyInto(out *ModelClaimEngineConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelClaimInstance ¶ added in v0.8.0
type ModelClaimInstance struct {
// Pod is the name of the warm GPU pod hosting this instance.
Pod string `json:"pod"`
// Port is the port on the pod that serves this model's engine process.
// +optional
Port int32 `json:"port,omitempty"`
// Phase is the per-instance lifecycle phase.
// +optional
Phase ModelClaimPhase `json:"phase,omitempty"`
// KVLimitBytes is the KV cache limit this instance's engine is meant to run
// under: the most KV memory it may map on each of its GPUs. The controller
// records it when it places the instance, before the engine starts, and
// then writes it to the engine.
//
// It is a record of intent. The engine obeys the limit held in its own KV
// allocator, and the two differ until a write lands, or after an engine
// restart puts the allocator's default back. It is unset when no card was
// divided for the instance: on a pod without a GPU, and for an instance
// placed before its claim declared a per-GPU cost.
// +optional
KVLimitBytes int64 `json:"kvLimitBytes,omitempty"`
// Reason says why the instance stands where it does, when its phase alone
// does not. The controller sets it, and clears it once it no longer holds.
//
// - WaitingForRoom: the engine sleeps, a request has asked for it, and its
// card cannot take it back yet.
// - NoRoomToWake: the engine slept, and its card could not take it back,
// so the claim is being moved to another pod.
// - WakeFailed: the runtime could not wake the engine, so the claim is
// being moved to another pod.
// +optional
Reason string `json:"reason,omitempty"`
}
ModelClaimInstance describes one engine instance of a ModelClaim running on a warm GPU pod.
func (*ModelClaimInstance) DeepCopy ¶ added in v0.8.0
func (in *ModelClaimInstance) DeepCopy() *ModelClaimInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelClaimInstance.
func (*ModelClaimInstance) DeepCopyInto ¶ added in v0.8.0
func (in *ModelClaimInstance) DeepCopyInto(out *ModelClaimInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelClaimList ¶ added in v0.8.0
type ModelClaimList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ModelClaim `json:"items"`
}
ModelClaimList contains a list of ModelClaim.
func (*ModelClaimList) DeepCopy ¶ added in v0.8.0
func (in *ModelClaimList) DeepCopy() *ModelClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelClaimList.
func (*ModelClaimList) DeepCopyInto ¶ added in v0.8.0
func (in *ModelClaimList) DeepCopyInto(out *ModelClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelClaimList) DeepCopyObject ¶ added in v0.8.0
func (in *ModelClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelClaimPerGPU ¶ added in v0.8.0
type ModelClaimPerGPU struct {
// MaximumFootprint is the largest non-KV GPU memory one instance holds on a
// device: weights, captured CUDA graphs, activation workspaces and
// allocator retention. It cannot be derived from the artifact size, because
// most of the gap between the two is allocator retention that does not
// scale with the weights, so it has to come from a run of this model with
// these engine arguments.
//
// A quantity, so it reads as `30Gi` rather than as a count of bytes nobody
// can check by eye.
// +kubebuilder:validation:Required
MaximumFootprint resource.Quantity `json:"maximumFootprint"`
// KVFloor is the KV cache one instance must keep on a device to serve at
// all: enough for one request of the engine's maximum model length at this
// model's bytes per token, rounded up to the KV allocator's page
// granularity. Placement holds this much for the instance for as long as it
// is awake. It holds this much while the instance sleeps too, unless the
// pool keeps no wake reserve.
// +kubebuilder:validation:Required
KVFloor resource.Quantity `json:"kvFloor"`
}
ModelClaimPerGPU is what one instance of a model costs on one GPU.
Both figures describe a single device rather than the whole model, because a card is what an instance has to fit on. With tensor or pipeline parallelism they describe the heaviest device: tensor parallelism makes the question moot, since every rank holds the same slice, while pipeline stages are not equal and one of them costs more than the rest. Declaring more than an instance needs wastes room and is safe; declaring less is not.
func (*ModelClaimPerGPU) DeepCopy ¶ added in v0.8.0
func (in *ModelClaimPerGPU) DeepCopy() *ModelClaimPerGPU
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelClaimPerGPU.
func (*ModelClaimPerGPU) DeepCopyInto ¶ added in v0.8.0
func (in *ModelClaimPerGPU) DeepCopyInto(out *ModelClaimPerGPU)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelClaimPhase ¶ added in v0.8.0
type ModelClaimPhase string
ModelClaimPhase is a high-level summary of where a ModelClaim is in its lifecycle. It maps to the latest status condition.
const ( // ModelClaimPending means the CR has been created; initial status. ModelClaimPending ModelClaimPhase = "Pending" // ModelClaimScheduling means the controller is selecting eligible warm pod(s) // to attach the model to. ModelClaimScheduling ModelClaimPhase = "Scheduling" // ModelClaimLoading means the pod agent is fetching weights and starting the // engine process for the model. ModelClaimLoading ModelClaimPhase = "Loading" // ModelClaimActivating means an engine has been spawned but is not yet // serveable (booting/compiling). Its warm-pod routing annotation is held at // the non-routable marker (port 0) until the runtime reports the engine ready, so // the gateway does not route to a not-ready engine. ModelClaimActivating ModelClaimPhase = "Activating" // ModelClaimActive means the model is serving on at least one warm pod. ModelClaimActive ModelClaimPhase = "Active" // ModelClaimSleeping means the resident engine is intentionally asleep and // non-routable. The assigned instance remains present so the // controller does not activate duplicate engines while waiting for a wake. ModelClaimSleeping ModelClaimPhase = "Sleeping" // ModelClaimFailed means activation terminated in a failure. ModelClaimFailed ModelClaimPhase = "Failed" // ModelClaimUnknown means the controller could not determine the state. ModelClaimUnknown ModelClaimPhase = "Unknown" )
type ModelClaimSpec ¶ added in v0.8.0
type ModelClaimSpec struct {
// ModelName is the served model identifier that clients address in requests
// (e.g. the `model` field of an OpenAI-style request). Defaults to the
// ModelClaim object name when omitted.
// +optional
ModelName *string `json:"modelName,omitempty"`
// PodSelector is a label query selecting the warm GPU pods this model may be
// attached to. It typically matches `claim.model.aibrix.ai/pool=<pool>`.
// Candidate pods must also advertise the enabled warm-pool label.
// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="podSelector is immutable; create a new ModelClaim instead"
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"`
// ArtifactURL is the address of the model weights to download. Multiple
// protocols are supported, e.g. s3://, gcs://, huggingface://.
// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="artifactURL is immutable; create a new ModelClaim instead"
ArtifactURL string `json:"artifactURL,omitempty"`
// Engine is the inference engine used to serve this model.
// +optional
// +kubebuilder:default=vllm
// +kubebuilder:validation:Enum=vllm;sglang
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="engine is immutable; create a new ModelClaim instead"
Engine string `json:"engine,omitempty"`
// Replicas is the desired number of active engine instances for this model
// inside the selected resource pool. For the initial high-density path the
// supported and default value is 1; the field is retained as the model-level
// serving slot count rather than a Kubernetes Deployment replica count.
// +optional
// +kubebuilder:default=1
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=1
Replicas *int32 `json:"replicas,omitempty"`
// EngineConfig carries engine-specific startup options. Args maps engine
// CLI flags to their values, e.g. {"--max-model-len": "2048"}.
// +optional
EngineConfig *ModelClaimEngineConfig `json:"engineConfig,omitempty"`
// PerGPU declares what one instance of this model costs on a single GPU.
// Placement uses it to keep a card from being promised more memory than it
// has, and to divide the card between the models on it, so a model is
// neither started where it cannot fit nor left at its floor while the card
// has room to spare.
//
// A claim without it is not placed. There is no figure the control plane
// could put here in its place: what an engine holds beyond its weights does
// not follow from the artifact, so a claim that does not say is a card that
// cannot be accounted for, and one such claim makes its whole card unusable
// to every other.
//
// Both figures have to be positive, and no more than 1Pi. A figure below
// 1Mi also has to be a whole number of bytes, and a larger one is rounded
// up to whole bytes. A claim whose declaration is missing or cannot be
// used is not placed, and its Scheduled condition says which figure is
// wrong.
//
// The schema leaves it optional, and the controller refuses the claim
// instead. A claim stored before this field existed has to stay valid. A
// required field would fail such a claim on its next update. Without CRD
// validation ratcheting, its finalizer could then never be removed. A
// missing declaration reads as missing rather than as a cost of zero.
// +optional
PerGPU *ModelClaimPerGPU `json:"perGPU,omitempty"`
}
ModelClaimSpec defines the desired state of ModelClaim.
Only perGPU can be changed after a claim is created. The other fields decide which engine runs and where, and the engine is started with them only once, so a change would never reach it. To change one, create a new ModelClaim. +kubebuilder:validation:XValidation:rule="has(self.modelName) == has(oldSelf.modelName) && (!has(self.modelName) || self.modelName == oldSelf.modelName)",message="modelName is immutable; create a new ModelClaim instead",fieldPath=".modelName" +kubebuilder:validation:XValidation:rule="has(self.engineConfig) == has(oldSelf.engineConfig) && (!has(self.engineConfig) || self.engineConfig == oldSelf.engineConfig)",message="engineConfig is immutable; create a new ModelClaim instead",fieldPath=".engineConfig"
func (*ModelClaimSpec) DeepCopy ¶ added in v0.8.0
func (in *ModelClaimSpec) DeepCopy() *ModelClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelClaimSpec.
func (*ModelClaimSpec) DeepCopyInto ¶ added in v0.8.0
func (in *ModelClaimSpec) DeepCopyInto(out *ModelClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelClaimStatus ¶ added in v0.8.0
type ModelClaimStatus struct {
// Phase is a high-level summary of the model's lifecycle.
// +optional
Phase ModelClaimPhase `json:"phase,omitempty"`
// Candidates is the number of warm pods matching the selector.
// +optional
Candidates int32 `json:"candidates,omitempty"`
// ReadyReplicas is the number of warm pods on which the model is active and
// ready to serve.
// +optional
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// DesiredReplicas is the desired number of active instances derived from
// spec.replicas.
// +optional
DesiredReplicas int32 `json:"desiredReplicas,omitempty"`
// Instances lists the per-pod engine instances of this model.
// +optional
Instances []ModelClaimInstance `json:"instances,omitempty"`
// Conditions represents the latest observations of the model's state.
// +patchMergeKey=type
// +patchStrategy=merge
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ModelClaimStatus defines the observed state of ModelClaim.
func (*ModelClaimStatus) DeepCopy ¶ added in v0.8.0
func (in *ModelClaimStatus) DeepCopy() *ModelClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelClaimStatus.
func (*ModelClaimStatus) DeepCopyInto ¶ added in v0.8.0
func (in *ModelClaimStatus) DeepCopyInto(out *ModelClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmup ¶ added in v0.8.0
type ModelWarmup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ModelWarmupSpec `json:"spec,omitempty"`
Status ModelWarmupStatus `json:"status,omitempty"`
}
+genclient +kubebuilder:object:root=true +kubebuilder:resource:shortName=mw +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Desired",type=integer,JSONPath=`.status.desiredNodes` +kubebuilder:printcolumn:name="Succeeded",type=integer,JSONPath=`.status.succeededNodes` +kubebuilder:printcolumn:name="Failed",type=integer,JSONPath=`.status.failedNodes` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ModelWarmup) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmup) DeepCopy() *ModelWarmup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmup.
func (*ModelWarmup) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmup) DeepCopyInto(out *ModelWarmup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelWarmup) DeepCopyObject ¶ added in v0.8.0
func (in *ModelWarmup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelWarmupCustomAction ¶ added in v0.8.0
type ModelWarmupCustomAction struct {
// +optional
// +kubebuilder:validation:MaxItems=32
InitContainers []corev1.Container `json:"initContainers,omitempty"`
// +optional
// +kubebuilder:validation:MaxItems=32
Containers []corev1.Container `json:"containers,omitempty"`
// +optional
// +kubebuilder:validation:MaxItems=32
Volumes []corev1.Volume `json:"volumes,omitempty"`
// +optional
// +kubebuilder:validation:MaxItems=32
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}
func (*ModelWarmupCustomAction) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupCustomAction) DeepCopy() *ModelWarmupCustomAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupCustomAction.
func (*ModelWarmupCustomAction) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupCustomAction) DeepCopyInto(out *ModelWarmupCustomAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmupImage ¶ added in v0.8.0
type ModelWarmupImage struct {
Image string `json:"image"`
// Command must name an executable present in the image and exit zero
// without starting the inference server. There is no portable default.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=64
Command []string `json:"command"`
// +optional
// +kubebuilder:validation:MaxItems=64
Args []string `json:"args,omitempty"`
// +optional
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
}
func (*ModelWarmupImage) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupImage) DeepCopy() *ModelWarmupImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupImage.
func (*ModelWarmupImage) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupImage) DeepCopyInto(out *ModelWarmupImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmupImagePreload ¶ added in v0.8.0
type ModelWarmupImagePreload struct {
// +kubebuilder:validation:MaxItems=32
// +optional
Images []ModelWarmupImage `json:"images,omitempty"`
// +optional
// +kubebuilder:validation:MaxItems=32
PullSecrets []corev1.LocalObjectReference `json:"pullSecrets,omitempty"`
}
func (*ModelWarmupImagePreload) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupImagePreload) DeepCopy() *ModelWarmupImagePreload
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupImagePreload.
func (*ModelWarmupImagePreload) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupImagePreload) DeepCopyInto(out *ModelWarmupImagePreload)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmupList ¶ added in v0.8.0
type ModelWarmupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ModelWarmup `json:"items"`
}
+kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ModelWarmupList) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupList) DeepCopy() *ModelWarmupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupList.
func (*ModelWarmupList) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupList) DeepCopyInto(out *ModelWarmupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ModelWarmupList) DeepCopyObject ¶ added in v0.8.0
func (in *ModelWarmupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ModelWarmupMode ¶ added in v0.8.0
type ModelWarmupMode string
const (
ModelWarmupModeOnce ModelWarmupMode = "Once"
)
type ModelWarmupNodesTarget ¶ added in v0.8.0
type ModelWarmupNodesTarget struct {
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=1000
Names []string `json:"names"`
}
func (*ModelWarmupNodesTarget) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupNodesTarget) DeepCopy() *ModelWarmupNodesTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupNodesTarget.
func (*ModelWarmupNodesTarget) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupNodesTarget) DeepCopyInto(out *ModelWarmupNodesTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmupPhase ¶ added in v0.8.0
type ModelWarmupPhase string
const ( ModelWarmupPending ModelWarmupPhase = "Pending" ModelWarmupRunning ModelWarmupPhase = "Running" ModelWarmupSucceeded ModelWarmupPhase = "Succeeded" ModelWarmupFailed ModelWarmupPhase = "Failed" ModelWarmupDegraded ModelWarmupPhase = "Degraded" )
type ModelWarmupPolicies ¶ added in v0.8.0
type ModelWarmupPolicies struct {
// +optional
// +kubebuilder:validation:Minimum=1
Parallelism *int32 `json:"parallelism,omitempty"`
// +optional
// +kubebuilder:validation:Minimum=1
JobTimeoutSeconds *int64 `json:"jobTimeoutSeconds,omitempty"`
// +optional
// +kubebuilder:validation:Minimum=0
RetryLimit *int32 `json:"retryLimit,omitempty"`
// +optional
// +kubebuilder:validation:Minimum=1
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
}
func (*ModelWarmupPolicies) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupPolicies) DeepCopy() *ModelWarmupPolicies
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupPolicies.
func (*ModelWarmupPolicies) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupPolicies) DeepCopyInto(out *ModelWarmupPolicies)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmupSpec ¶ added in v0.8.0
type ModelWarmupSpec struct {
// Mode controls the warmup lifecycle. Omission means Once. Continuous is
// reserved for a future API revision.
// +optional
Mode ModelWarmupMode `json:"mode,omitempty"`
// Targets declares explicit node names and label selectors. The controller
// resolves and deduplicates their union.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=32
Targets []ModelWarmupTarget `json:"targets"`
// +optional
ImagePreload ModelWarmupImagePreload `json:"imagePreload,omitempty"`
// +optional
Custom *ModelWarmupCustomAction `json:"custom,omitempty"`
// +optional
Policies *ModelWarmupPolicies `json:"policies,omitempty"`
}
func (*ModelWarmupSpec) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupSpec) DeepCopy() *ModelWarmupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupSpec.
func (*ModelWarmupSpec) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupSpec) DeepCopyInto(out *ModelWarmupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmupStatus ¶ added in v0.8.0
type ModelWarmupStatus struct {
// +optional
Phase ModelWarmupPhase `json:"phase,omitempty"`
// +optional
ObservedRevision string `json:"observedRevision,omitempty"`
// +optional
DesiredNodes int32 `json:"desiredNodes,omitempty"`
// +optional
ActiveNodes int32 `json:"activeNodes,omitempty"`
// +optional
SucceededNodes int32 `json:"succeededNodes,omitempty"`
// +optional
FailedNodes int32 `json:"failedNodes,omitempty"`
// OmittedTargetDetails is the number of pending or failed target details
// omitted to keep the status object bounded.
// +optional
OmittedTargetDetails int32 `json:"omittedTargetDetails,omitempty"`
// +optional
StartTime *metav1.Time `json:"startTime,omitempty"`
// +optional
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
// +optional
Targets []ModelWarmupTargetStatus `json:"targets,omitempty"`
// +patchMergeKey=type
// +patchStrategy=merge
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
func (*ModelWarmupStatus) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupStatus) DeepCopy() *ModelWarmupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupStatus.
func (*ModelWarmupStatus) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupStatus) DeepCopyInto(out *ModelWarmupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmupTarget ¶ added in v0.8.0
type ModelWarmupTarget struct {
// Nodes lists explicitly selected node names.
// +optional
Nodes *ModelWarmupNodesTarget `json:"nodes,omitempty"`
// NodeSelector selects nodes by labels. Empty selectors are rejected by admission.
// +optional
NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"`
}
func (*ModelWarmupTarget) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupTarget) DeepCopy() *ModelWarmupTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupTarget.
func (*ModelWarmupTarget) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupTarget) DeepCopyInto(out *ModelWarmupTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelWarmupTargetPhase ¶ added in v0.8.0
type ModelWarmupTargetPhase string
const ( ModelWarmupTargetPending ModelWarmupTargetPhase = "Pending" ModelWarmupTargetRunning ModelWarmupTargetPhase = "Running" ModelWarmupTargetSucceeded ModelWarmupTargetPhase = "Succeeded" ModelWarmupTargetFailed ModelWarmupTargetPhase = "Failed" )
type ModelWarmupTargetStatus ¶ added in v0.8.0
type ModelWarmupTargetStatus struct {
NodeName string `json:"nodeName"`
// +optional
Source string `json:"source,omitempty"`
// +optional
SourceCount int32 `json:"sourceCount,omitempty"`
// +optional
Revision string `json:"revision,omitempty"`
// +optional
JobName string `json:"jobName,omitempty"`
// +optional
Phase ModelWarmupTargetPhase `json:"phase,omitempty"`
// +optional
// +kubebuilder:validation:MaxLength=1024
Reason string `json:"reason,omitempty"`
// +optional
// +kubebuilder:validation:MaxLength=1024
Message string `json:"message,omitempty"`
// +optional
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
}
func (*ModelWarmupTargetStatus) DeepCopy ¶ added in v0.8.0
func (in *ModelWarmupTargetStatus) DeepCopy() *ModelWarmupTargetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWarmupTargetStatus.
func (*ModelWarmupTargetStatus) DeepCopyInto ¶ added in v0.8.0
func (in *ModelWarmupTargetStatus) DeepCopyInto(out *ModelWarmupTargetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.