Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the aim v1alpha1 API group. +kubebuilder:object:generate=true +groupName=aim.eai.amd.com
Index ¶
- Constants
- Variables
- type AIMArtifact
- type AIMArtifactList
- type AIMArtifactMode
- type AIMArtifactSpec
- type AIMArtifactStatus
- func (in *AIMArtifactStatus) DeepCopy() *AIMArtifactStatus
- func (in *AIMArtifactStatus) DeepCopyInto(out *AIMArtifactStatus)
- func (s *AIMArtifactStatus) GetAIMStatus() constants.AIMStatus
- func (s *AIMArtifactStatus) GetConditions() []metav1.Condition
- func (s *AIMArtifactStatus) SetConditions(conditions []metav1.Condition)
- func (s *AIMArtifactStatus) SetStatus(status string)
- type AIMCachingMode
- type AIMClusterModel
- type AIMClusterModelList
- type AIMClusterModelSource
- func (in *AIMClusterModelSource) DeepCopy() *AIMClusterModelSource
- func (in *AIMClusterModelSource) DeepCopyInto(out *AIMClusterModelSource)
- func (in *AIMClusterModelSource) DeepCopyObject() runtime.Object
- func (s *AIMClusterModelSource) GetMaxModels() int
- func (s *AIMClusterModelSource) GetStatus() *AIMClusterModelSourceStatus
- type AIMClusterModelSourceList
- type AIMClusterModelSourceSpec
- type AIMClusterModelSourceStatus
- func (in *AIMClusterModelSourceStatus) DeepCopy() *AIMClusterModelSourceStatus
- func (in *AIMClusterModelSourceStatus) DeepCopyInto(out *AIMClusterModelSourceStatus)
- func (s *AIMClusterModelSourceStatus) GetConditions() []metav1.Condition
- func (s *AIMClusterModelSourceStatus) SetConditions(conditions []metav1.Condition)
- func (s *AIMClusterModelSourceStatus) SetStatus(status string)
- type AIMClusterRuntimeConfig
- type AIMClusterRuntimeConfigList
- type AIMClusterRuntimeConfigSpec
- type AIMClusterServiceTemplate
- func (in *AIMClusterServiceTemplate) DeepCopy() *AIMClusterServiceTemplate
- func (in *AIMClusterServiceTemplate) DeepCopyInto(out *AIMClusterServiceTemplate)
- func (in *AIMClusterServiceTemplate) DeepCopyObject() runtime.Object
- func (t *AIMClusterServiceTemplate) GetModelName() string
- func (t *AIMClusterServiceTemplate) GetRuntimeConfigRef() RuntimeConfigRef
- func (t *AIMClusterServiceTemplate) GetSpecModelSources() []AIMModelSource
- func (t *AIMClusterServiceTemplate) GetStatus() *AIMServiceTemplateStatus
- type AIMClusterServiceTemplateList
- type AIMClusterServiceTemplateSpec
- type AIMCpuRequirements
- type AIMCustomModelSpec
- type AIMCustomTemplate
- type AIMDiscoveryProfile
- type AIMDiscoveryProfileMetadata
- type AIMGpuRequirements
- type AIMHardwareRequirements
- type AIMMetric
- type AIMModel
- type AIMModelConfig
- type AIMModelDiscoveryConfig
- type AIMModelList
- type AIMModelSource
- type AIMModelSourceType
- type AIMModelSpec
- func (in *AIMModelSpec) DeepCopy() *AIMModelSpec
- func (in *AIMModelSpec) DeepCopyInto(out *AIMModelSpec)
- func (s *AIMModelSpec) ExpectsTemplates(status *AIMModelStatus) *bool
- func (s *AIMModelSpec) GetEffectiveImageMetadata(status *AIMModelStatus) *ImageMetadata
- func (s *AIMModelSpec) ShouldCreateTemplates() bool
- type AIMModelStatus
- func (in *AIMModelStatus) DeepCopy() *AIMModelStatus
- func (in *AIMModelStatus) DeepCopyInto(out *AIMModelStatus)
- func (s *AIMModelStatus) GetAIMStatus() constants.AIMStatus
- func (s *AIMModelStatus) GetConditions() []metav1.Condition
- func (s *AIMModelStatus) SetConditions(conditions []metav1.Condition)
- func (s *AIMModelStatus) SetStatus(status string)
- type AIMPrecision
- type AIMProfile
- type AIMProfileMetadata
- type AIMProfileType
- type AIMResolutionScope
- type AIMResolvedArtifact
- type AIMResolvedReference
- type AIMRuntimeConfig
- type AIMRuntimeConfigCommon
- type AIMRuntimeConfigLabelPropagationSpec
- type AIMRuntimeConfigList
- type AIMRuntimeConfigSpec
- type AIMRuntimeConfigStatus
- type AIMRuntimeParameters
- type AIMRuntimeRoutingConfig
- type AIMService
- type AIMServiceAutoScaling
- type AIMServiceCacheStatus
- type AIMServiceCachingConfig
- type AIMServiceList
- type AIMServiceMetricTarget
- type AIMServiceMetricsSpec
- type AIMServiceModel
- type AIMServiceModelCustom
- type AIMServiceOverrides
- type AIMServicePodMetric
- type AIMServicePodMetricSource
- type AIMServiceRoutingStatus
- type AIMServiceRuntimeConfig
- type AIMServiceRuntimeStatus
- type AIMServiceSpec
- type AIMServiceStatus
- func (in *AIMServiceStatus) DeepCopy() *AIMServiceStatus
- func (in *AIMServiceStatus) DeepCopyInto(out *AIMServiceStatus)
- func (s *AIMServiceStatus) GetAIMStatus() constants.AIMStatus
- func (s *AIMServiceStatus) GetConditions() []metav1.Condition
- func (s *AIMServiceStatus) SetConditions(conditions []metav1.Condition)
- func (s *AIMServiceStatus) SetStatus(status string)
- type AIMServiceStatusEnum
- type AIMServiceTemplate
- func (in *AIMServiceTemplate) DeepCopy() *AIMServiceTemplate
- func (in *AIMServiceTemplate) DeepCopyInto(out *AIMServiceTemplate)
- func (in *AIMServiceTemplate) DeepCopyObject() runtime.Object
- func (t *AIMServiceTemplate) GetModelName() string
- func (t *AIMServiceTemplate) GetRuntimeConfigRef() RuntimeConfigRef
- func (t *AIMServiceTemplate) GetSpecModelSources() []AIMModelSource
- func (t *AIMServiceTemplate) GetStatus() *AIMServiceTemplateStatus
- type AIMServiceTemplateConfig
- type AIMServiceTemplateList
- type AIMServiceTemplateScope
- type AIMServiceTemplateSpec
- type AIMServiceTemplateSpecCommon
- type AIMServiceTemplateStatus
- func (in *AIMServiceTemplateStatus) DeepCopy() *AIMServiceTemplateStatus
- func (in *AIMServiceTemplateStatus) DeepCopyInto(out *AIMServiceTemplateStatus)
- func (s *AIMServiceTemplateStatus) GetAIMStatus() constants.AIMStatus
- func (s *AIMServiceTemplateStatus) GetConditions() []metav1.Condition
- func (s *AIMServiceTemplateStatus) SetConditions(conditions []metav1.Condition)
- func (s *AIMServiceTemplateStatus) SetStatus(status string)
- type AIMStorageConfig
- type AIMTemplateCache
- func (in *AIMTemplateCache) DeepCopy() *AIMTemplateCache
- func (in *AIMTemplateCache) DeepCopyInto(out *AIMTemplateCache)
- func (in *AIMTemplateCache) DeepCopyObject() runtime.Object
- func (t *AIMTemplateCache) GetRuntimeConfigRef() RuntimeConfigRef
- func (t *AIMTemplateCache) GetStatus() *AIMTemplateCacheStatus
- type AIMTemplateCacheList
- type AIMTemplateCacheMode
- type AIMTemplateCacheSpec
- type AIMTemplateCacheStatus
- func (in *AIMTemplateCacheStatus) DeepCopy() *AIMTemplateCacheStatus
- func (in *AIMTemplateCacheStatus) DeepCopyInto(out *AIMTemplateCacheStatus)
- func (s *AIMTemplateCacheStatus) GetAIMStatus() constants.AIMStatus
- func (s *AIMTemplateCacheStatus) GetConditions() []metav1.Condition
- func (s *AIMTemplateCacheStatus) SetConditions(conditions []metav1.Condition)
- func (s *AIMTemplateCacheStatus) SetStatus(status string)
- type AIMTemplateCachingConfig
- type AIMTemplateCandidateResult
- type AIMTemplateProfile
- type DiscoveryState
- type DownloadProgress
- type DownloadState
- type ImageMetadata
- type ModelMetadata
- type ModelSourceFilter
- type OCIMetadata
- type ProfileDiscoveryStatusEnum
- type RecommendedDeployment
- type RuntimeConfigRef
Constants ¶
const ( DefaultDownloadImage = "ghcr.io/silogen/aim-artifact-downloader:0.2.0" // ArtifactSourceURIIndexKey is the field index key for AIMArtifact.Spec.SourceURI ArtifactSourceURIIndexKey = ".spec.sourceUri" )
const ( // ArtifactConditionDownloadComplete is True when the download phase has finished // and the job has moved to verification. Progress will show 100% at this point. ArtifactConditionDownloadComplete = "DownloadComplete" ArtifactReasonDownloading = "Downloading" ArtifactReasonDownloadComplete = "DownloadComplete" ArtifactReasonVerifying = "Verifying" ArtifactReasonVerified = "Verified" )
const ( // ClusterModelImageIndexKey is the field index key for AIMClusterModel.Spec.Image ClusterModelImageIndexKey = ".spec.image" // ClusterModelRuntimeConfigIndexKey is the field index key for AIMClusterModel.Spec.Name (runtimeConfigName) ClusterModelRuntimeConfigIndexKey = ".spec.runtimeConfigName" )
const ( // AIMModelConditionMetadataExtracted captures whether image metadata extraction succeeded. AIMModelConditionMetadataExtracted = "MetadataExtracted" // AIMModelReasonMetadataExtracted indicates metadata extraction succeeded. AIMModelReasonMetadataExtracted = "MetadataExtracted" // AIMModelReasonMetadataExtractionFailed indicates metadata extraction failed (non-blocking, prevents retries). AIMModelReasonMetadataExtractionFailed = "MetadataExtractionFailed" // Runtime config resolution reasons AIMModelReasonConfigNotFound = "ConfigNotFound" AIMModelReasonRuntimeConfigError = "RuntimeConfigError" AIMModelReasonUsingDefaults = "UsingDefaults" AIMModelReasonResolved = "Resolved" // Template status reasons AIMModelReasonAllTemplatesFailed = "AllTemplatesFailed" AIMModelReasonNoTemplatesAvailable = "NoTemplatesAvailable" AIMModelReasonSomeTemplatesDegraded = "SomeTemplatesDegraded" AIMModelReasonTemplatesProgressing = "TemplatesProgressing" AIMModelReasonAllTemplatesReady = "AllTemplatesReady" AIMModelReasonSomeTemplatesReady = "SomeTemplatesReady" AIMModelReasonNoTemplatesExpected = "NoTemplatesExpected" AIMModelReasonAwaitingMetadata = "AwaitingMetadata" AIMModelReasonCreatingTemplates = "CreatingTemplates" AIMModelReasonMetadataMissingRecommendedDeployments = "MetadataMissingRecommendedDeployments" )
const ( // ModelImageIndexKey is the field index key for AIMModel.Spec.Image ModelImageIndexKey = ".spec.image" // ModelRuntimeConfigIndexKey is the field index key for AIMModel.Spec.Name (runtimeConfigName) ModelRuntimeConfigIndexKey = ".spec.runtimeConfigName" )
const ( // AIMServiceTemplateIndexKey is the field index key used by controller-runtime for // indexing AIMService resources by their template reference (.spec.template.name). // This enables efficient lookups of services that reference a specific template. AIMServiceTemplateIndexKey = ".spec.templateRef" // AIMServiceResolvedTemplateIndexKey is the field index key for resolved template name // Indexes by .status.resolvedTemplate.name for finding services using a specific template AIMServiceResolvedTemplateIndexKey = ".status.resolvedTemplate.name" )
const ( // Model Resolution AIMServiceReasonInvalidImageReference = "InvalidImageReference" AIMServiceReasonModelNotFound = "ModelNotFound" AIMServiceReasonCreatingModel = "CreatingModel" AIMServiceReasonModelNotReady = "ModelNotReady" AIMServiceReasonModelResolved = "ModelResolved" // Template Resolution AIMServiceReasonTemplateNotFound = "TemplateNotFound" AIMServiceReasonTemplateNotReady = "TemplateNotReady" AIMServiceReasonResolved = "Resolved" AIMServiceReasonTemplateSelectionAmbiguous = "TemplateSelectionAmbiguous" // Storage AIMServiceReasonPVCNotBound = "PVCNotBound" AIMServiceReasonStorageReady = "StorageReady" AIMServiceReasonStorageSizeError = "StorageSizeError" // Cache AIMServiceReasonCacheCreating = "CacheCreating" AIMServiceReasonCacheNotReady = "CacheNotReady" AIMServiceReasonCacheReady = "CacheReady" AIMServiceReasonCacheFailed = "CacheFailed" AIMServiceReasonCacheLost = "CacheLost" // Runtime AIMServiceReasonCreatingRuntime = "CreatingRuntime" AIMServiceReasonRuntimeReady = "RuntimeReady" // Routing AIMServiceReasonPathTemplateInvalid = "PathTemplateInvalid" )
Condition reasons for AIMService
const ( // AIMTemplateConditionCacheReady is True when all requested caches have been warmed. AIMTemplateCacheReadyConditionType = "CacheReady" AIMTemplateReasonCacheReady = "Ready" AIMTemplateReasonWaitingForCache = "WaitingForCache" AIMTemplateReasonCacheDegraded = "CacheDegraded" AIMTemplateReasonCacheFailed = "CacheFailed" )
Caching conditions
const ( // Discovery related AIMTemplateReasonAwaitingDiscovery = "AwaitingDiscovery" AIMTemplateReasonProfilesDiscovered = "ProfilesDiscovered" AIMTemplateReasonDiscoveryFailed = "DiscoveryFailed" AIMTemplateReasonGpuNotAvailable = "GpuNotAvailable" // Model resolution reasons AIMTemplateModelNotFound = "ModelNotResolved" AIMTemplateReasonModelFound = "ModelResolved" // Template resolution reasons AIMTemplateReasonAwaitingTemplate = "AwaitingTemplate" AIMTemplateReasonTemplateFound = "TemplateFound" // Model resolution condition type AIMServiceTemplateConditionModelFound = "ModelFound" )
Condition reasons for AIMServiceTemplate
const ( // TemplateCacheTemplateNameIndexKey is the field index key for AIMTemplateCache.Spec.TemplateName TemplateCacheTemplateNameIndexKey = ".spec.templateName" // TemplateCacheTemplateScopeIndexKey is the field index key for AIMTemplateCache.Spec.TemplateScope TemplateCacheTemplateScopeIndexKey = ".spec.templateScope" )
const ( // AIMTemplateCacheConditionResolved is True when the template reference has been resolved. AIMTemplateCacheConditionResolved = "Resolved" // AIMTemplateCacheConditionCacheReady is True when the template's models are cached. AIMTemplateCacheConditionCacheReady = "CacheReady" // AIMTemplateCacheConditionReady is True when the template cache is ready. AIMTemplateCacheConditionReady = "Ready" // AIMTemplateCacheConditionProgressing is True when cache warming is in progress. AIMTemplateCacheConditionProgressing = "Progressing" // AIMTemplateCacheConditionFailure is True when a failure has occurred. AIMTemplateCacheConditionFailure = "Failure" )
Condition types for AIMTemplateCache
const ( // Resolution related AIMTemplateCacheReasonTemplateNotFound = "TemplateNotFound" AIMTemplateCacheReasonResolved = "Resolved" // Cache related AIMTemplateCacheReasonWarming = "Warming" AIMTemplateCacheReasonWarm = "Warm" AIMTemplateCacheReasonFailed = "Failed" // Template resolution AIMTemplateCacheConditionTemplateFound = "TemplateFound" )
Condition reasons for AIMTemplateCache
const (
// AIMTemplateDiscoveryConditionType is True when runtime profiles have been discovered and sources resolved for the referenced model.
AIMTemplateDiscoveryConditionType = "Discovered"
)
Discovery conditions
const DefaultSyncInterval = 1 * time.Hour
DefaultSyncInterval is the default interval between registry syncs (1 hour).
const ( // ServiceTemplateModelNameIndexKey is the field index key for AIMServiceTemplate.Spec.ModelName // This is also used for AIMClusterServiceTemplate.Spec.ModelName ServiceTemplateModelNameIndexKey = ".spec.modelName" )
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "aim.eai.amd.com", Version: "v1alpha1"} // 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 AIMArtifact ¶
type AIMArtifact struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMArtifactSpec `json:"spec,omitempty"`
Status AIMArtifactStatus `json:"status,omitempty"`
}
AIMArtifact is the Schema for the artifacts API
func (*AIMArtifact) DeepCopy ¶
func (in *AIMArtifact) DeepCopy() *AIMArtifact
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMArtifact.
func (*AIMArtifact) DeepCopyInto ¶
func (in *AIMArtifact) DeepCopyInto(out *AIMArtifact)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMArtifact) DeepCopyObject ¶
func (in *AIMArtifact) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AIMArtifact) GetRuntimeConfigRef ¶
func (m *AIMArtifact) GetRuntimeConfigRef() RuntimeConfigRef
func (*AIMArtifact) GetStatus ¶
func (m *AIMArtifact) GetStatus() *AIMArtifactStatus
type AIMArtifactList ¶
type AIMArtifactList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMArtifact `json:"items"`
}
AIMArtifactList contains a list of AIMArtifact
func (*AIMArtifactList) DeepCopy ¶
func (in *AIMArtifactList) DeepCopy() *AIMArtifactList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMArtifactList.
func (*AIMArtifactList) DeepCopyInto ¶
func (in *AIMArtifactList) DeepCopyInto(out *AIMArtifactList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMArtifactList) DeepCopyObject ¶
func (in *AIMArtifactList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMArtifactMode ¶
type AIMArtifactMode string
AIMArtifactMode indicates the ownership mode of a artifact, derived from owner references. +kubebuilder:validation:Enum=Dedicated;Shared
const ( // ArtifactModeDedicated indicates the cache has owner references and will be // garbage collected when its owners are deleted. ArtifactModeDedicated AIMArtifactMode = "Dedicated" // independently, available for sharing across services. ArtifactModeShared AIMArtifactMode = "Shared" )
type AIMArtifactSpec ¶
type AIMArtifactSpec struct {
// SourceURI specifies the source location of the model to download.
// Supported protocols: hf:// (HuggingFace) and s3:// (S3-compatible storage).
// This field uniquely identifies the artifact and is immutable after creation.
// Example: hf://meta-llama/Llama-3-8B
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="sourceUri is immutable"
// +kubebuilder:validation:Pattern=`^(hf|s3)://[^ \t\r\n]+$`
SourceURI string `json:"sourceUri"`
// ModelID is the canonical identifier in {org}/{name} format.
// Determines the cache download path: /workspace/cache/{modelId}
// For HuggingFace sources, this is typically derived from the URI (e.g., "meta-llama/Llama-3-8B").
// For S3 sources, this must be explicitly provided (e.g., "my-team/fine-tuned-llama").
// When not specified, derived from SourceURI for HuggingFace sources.
// +optional
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9_-]+/[a-zA-Z0-9._-]+$`
ModelID string `json:"modelId,omitempty"`
// StorageClassName specifies the storage class for the cache volume.
// When not specified, uses the cluster default storage class.
// +optional
StorageClassName string `json:"storageClassName,omitempty"`
// Size specifies the size of the cache volume
// +optional
Size resource.Quantity `json:"size"`
// Env lists the environment variables to use for authentication when downloading models.
// These variables are used for authentication with model registries (e.g., HuggingFace tokens).
// +optional
// +listType=map
// +listMapKey=name
Env []corev1.EnvVar `json:"env,omitempty"`
// ModelDownloadImage specifies the container image used to download and initialize the artifact.
// This image runs as a job to download model artifacts from the source URI to the cache volume.
// When not specified, defaults to "ghcr.io/silogen/aim-artifact-downloader:0.2.0".
// +optional
// +kubebuilder:default="ghcr.io/silogen/aim-artifact-downloader:0.2.0"
ModelDownloadImage string `json:"modelDownloadImage,omitempty"`
// ImagePullSecrets references secrets for pulling AIM container images.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// RuntimeConfigRef contains the runtime config reference for this artifact.
RuntimeConfigRef `json:",inline"`
}
AIMArtifactSpec defines the desired state of AIMArtifact
func (*AIMArtifactSpec) DeepCopy ¶
func (in *AIMArtifactSpec) DeepCopy() *AIMArtifactSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMArtifactSpec.
func (*AIMArtifactSpec) DeepCopyInto ¶
func (in *AIMArtifactSpec) DeepCopyInto(out *AIMArtifactSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMArtifactStatus ¶
type AIMArtifactStatus struct {
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions represent the latest available observations of the artifact's state
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// Status represents the current status of the artifact
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Progressing;Ready;Degraded;Failed;NotAvailable
Status constants.AIMStatus `json:"status,omitempty"`
// Progress represents the download progress when Status is Progressing
// +optional
Progress *DownloadProgress `json:"progress,omitempty"`
// Download represents the current download attempt state, patched by the downloader pod.
// Shows which protocol is active, what attempt we're on, etc.
// +optional
Download *DownloadState `json:"download,omitempty"`
// DisplaySize is the human-readable effective size (spec or discovered)
// +optional
DisplaySize string `json:"displaySize,omitempty"`
// LastUsed represents the last time a model was deployed that used this cache
LastUsed *metav1.Time `json:"lastUsed,omitempty"`
// PersistentVolumeClaim represents the name of the created PVC
PersistentVolumeClaim string `json:"persistentVolumeClaim,omitempty"`
// Mode indicates the ownership mode of this artifact, derived from owner references.
// - Dedicated: Has owner references, will be garbage collected when owners are deleted.
// - Shared: No owner references, persists independently and can be shared.
// +optional
Mode AIMArtifactMode `json:"mode,omitempty"`
// DiscoveredSizeBytes is the model size discovered via check-size job.
// Populated when spec.size is not provided.
// +optional
DiscoveredSizeBytes *int64 `json:"discoveredSizeBytes,omitempty"`
// AllocatedSize is the actual PVC size requested (including headroom).
// +optional
AllocatedSize resource.Quantity `json:"allocatedSize,omitempty"`
// HeadroomPercent is the headroom percentage that was applied to the PVC size.
// +optional
HeadroomPercent *int32 `json:"headroomPercent,omitempty"`
}
AIMArtifactStatus defines the observed state of AIMArtifact
func (*AIMArtifactStatus) DeepCopy ¶
func (in *AIMArtifactStatus) DeepCopy() *AIMArtifactStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMArtifactStatus.
func (*AIMArtifactStatus) DeepCopyInto ¶
func (in *AIMArtifactStatus) DeepCopyInto(out *AIMArtifactStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMArtifactStatus) GetAIMStatus ¶
func (s *AIMArtifactStatus) GetAIMStatus() constants.AIMStatus
func (*AIMArtifactStatus) GetConditions ¶
func (s *AIMArtifactStatus) GetConditions() []metav1.Condition
func (*AIMArtifactStatus) SetConditions ¶
func (s *AIMArtifactStatus) SetConditions(conditions []metav1.Condition)
func (*AIMArtifactStatus) SetStatus ¶
func (s *AIMArtifactStatus) SetStatus(status string)
type AIMCachingMode ¶
type AIMCachingMode string
AIMCachingMode controls caching behavior for a service. Canonical values are Dedicated and Shared. Legacy values are accepted for backward compatibility: - Always maps to Shared - Auto maps to Shared - Never maps to Dedicated +kubebuilder:validation:Enum=Dedicated;Shared;Auto;Always;Never
const ( // CachingModeDedicated always creates service-owned dedicated caches/artifacts. CachingModeDedicated AIMCachingMode = "Dedicated" CachingModeShared AIMCachingMode = "Shared" // CachingModeAuto is deprecated legacy value that maps to Shared. CachingModeAuto AIMCachingMode = "Auto" // CachingModeAlways is deprecated legacy value that maps to Shared. CachingModeAlways AIMCachingMode = "Always" // CachingModeNever is deprecated legacy value that maps to Dedicated. CachingModeNever AIMCachingMode = "Never" )
type AIMClusterModel ¶
type AIMClusterModel struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMModelSpec `json:"spec,omitempty"`
Status AIMModelStatus `json:"status,omitempty"`
}
AIMClusterModel is a cluster-scoped model catalog entry for AIM container images.
Cluster-scoped models can be referenced by AIMServices in any namespace, making them ideal for shared model deployments across teams and projects. Like namespace-scoped AIMModels, cluster models trigger discovery jobs to extract metadata and generate service templates.
When both cluster and namespace models exist for the same container image, services will preferentially use the namespace-scoped AIMModel when referenced by image URI. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName=aimclmdl,categories=aim;all +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Source",type=string,JSONPath=`.status.sourceType` +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.spec.image` +kubebuilder:printcolumn:name="Model",type=string,JSONPath=`.status.imageMetadata.model.canonicalName` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*AIMClusterModel) DeepCopy ¶
func (in *AIMClusterModel) DeepCopy() *AIMClusterModel
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterModel.
func (*AIMClusterModel) DeepCopyInto ¶
func (in *AIMClusterModel) DeepCopyInto(out *AIMClusterModel)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterModel) DeepCopyObject ¶
func (in *AIMClusterModel) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AIMClusterModel) GetRuntimeConfigRef ¶
func (img *AIMClusterModel) GetRuntimeConfigRef() RuntimeConfigRef
func (*AIMClusterModel) GetStatus ¶
func (img *AIMClusterModel) GetStatus() *AIMModelStatus
type AIMClusterModelList ¶
type AIMClusterModelList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMClusterModel `json:"items"`
}
AIMClusterModelList contains a list of AIMClusterModel. +kubebuilder:object:root=true
func (*AIMClusterModelList) DeepCopy ¶
func (in *AIMClusterModelList) DeepCopy() *AIMClusterModelList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterModelList.
func (*AIMClusterModelList) DeepCopyInto ¶
func (in *AIMClusterModelList) DeepCopyInto(out *AIMClusterModelList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterModelList) DeepCopyObject ¶
func (in *AIMClusterModelList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMClusterModelSource ¶
type AIMClusterModelSource struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMClusterModelSourceSpec `json:"spec,omitempty"`
Status AIMClusterModelSourceStatus `json:"status,omitempty"`
}
AIMClusterModelSource automatically discovers and syncs AI model images from container registries. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName=aimclsrc,categories=aim;all +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Models",type=integer,JSONPath=`.status.discoveredModels` +kubebuilder:printcolumn:name="LastSync",type=date,JSONPath=`.status.lastSyncTime` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*AIMClusterModelSource) DeepCopy ¶
func (in *AIMClusterModelSource) DeepCopy() *AIMClusterModelSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterModelSource.
func (*AIMClusterModelSource) DeepCopyInto ¶
func (in *AIMClusterModelSource) DeepCopyInto(out *AIMClusterModelSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterModelSource) DeepCopyObject ¶
func (in *AIMClusterModelSource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AIMClusterModelSource) GetMaxModels ¶
func (s *AIMClusterModelSource) GetMaxModels() int
GetMaxModels returns the maximum number of models, defaulting to 100 if not set.
func (*AIMClusterModelSource) GetStatus ¶
func (s *AIMClusterModelSource) GetStatus() *AIMClusterModelSourceStatus
GetStatus returns a pointer to the status for use with the controller pipeline.
type AIMClusterModelSourceList ¶
type AIMClusterModelSourceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMClusterModelSource `json:"items"`
}
AIMClusterModelSourceList contains a list of AIMClusterModelSource. +kubebuilder:object:root=true
func (*AIMClusterModelSourceList) DeepCopy ¶
func (in *AIMClusterModelSourceList) DeepCopy() *AIMClusterModelSourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterModelSourceList.
func (*AIMClusterModelSourceList) DeepCopyInto ¶
func (in *AIMClusterModelSourceList) DeepCopyInto(out *AIMClusterModelSourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterModelSourceList) DeepCopyObject ¶
func (in *AIMClusterModelSourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMClusterModelSourceSpec ¶
type AIMClusterModelSourceSpec struct {
// Registry to sync from (e.g., docker.io, ghcr.io, gcr.io).
// Defaults to docker.io if not specified.
// +kubebuilder:default=docker.io
// +optional
Registry string `json:"registry,omitempty"`
// ImagePullSecrets contains references to secrets for authenticating to private registries.
// Secrets must exist in the operator namespace (typically aim-system).
// Used for both registry catalog listing and image metadata extraction.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// Filters define which images to discover and sync.
// Each filter specifies an image pattern with optional version constraints and exclusions.
// Multiple filters are combined with OR logic (any match includes the image).
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=100
Filters []ModelSourceFilter `json:"filters"`
// SyncInterval defines how often to sync with the registry.
// Defaults to 1h. Minimum recommended interval is 15m to avoid rate limiting.
// Format: duration string (e.g., "30m", "1h", "2h30m").
// +kubebuilder:default="1h"
// +optional
SyncInterval metav1.Duration `json:"syncInterval,omitempty"`
// Versions specifies global semantic version constraints applied to all filters.
// Individual filters can override this with their own version constraints.
// Constraints use semver syntax: >=1.0.0, <2.0.0, ~1.2.0, ^1.0.0, etc.
// Non-semver tags (e.g., "latest", "dev") are silently skipped.
//
// Version ranges work on all registries (including ghcr.io, gcr.io) when combined with
// exact repository names (no wildcards). The controller uses the Tags List API to fetch
// all tags for the repository and filters them by the semver constraint.
//
// Example: registry=ghcr.io, filters=[{image: "silogen/aim-llama"}], versions=[">=1.0.0"]
// will fetch all tags from ghcr.io/silogen/aim-llama and include only those >=1.0.0.
// +optional
Versions []string `json:"versions,omitempty"`
// MaxModels is the maximum number of AIMClusterModel resources to create from this source.
// Once this limit is reached, no new models will be created, even if more matching images are discovered.
// Existing models are never deleted.
// This prevents runaway model creation from overly broad filters.
// +kubebuilder:default=100
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=10000
// +optional
MaxModels *int `json:"maxModels,omitempty"`
}
AIMClusterModelSourceSpec defines the desired state of AIMClusterModelSource.
func (*AIMClusterModelSourceSpec) DeepCopy ¶
func (in *AIMClusterModelSourceSpec) DeepCopy() *AIMClusterModelSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterModelSourceSpec.
func (*AIMClusterModelSourceSpec) DeepCopyInto ¶
func (in *AIMClusterModelSourceSpec) DeepCopyInto(out *AIMClusterModelSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMClusterModelSourceStatus ¶
type AIMClusterModelSourceStatus struct {
// Status represents the overall state of the model source.
// +kubebuilder:validation:Enum=Pending;Starting;Progressing;Ready;Running;Degraded;NotAvailable;Failed
// +optional
Status string `json:"status,omitempty"`
// LastSyncTime is the timestamp of the last successful registry sync.
// Updated after each successful sync operation.
// +optional
LastSyncTime *metav1.Time `json:"lastSyncTime,omitempty"`
// DiscoveredModels is the count of AIMClusterModel resources managed by this source.
// Includes both existing and newly created models.
// +optional
DiscoveredModels int `json:"discoveredModels,omitempty"`
// AvailableModels is the total count of images discovered in the registry that match the filters.
// This may be higher than DiscoveredModels if maxModels limit was reached.
// +optional
AvailableModels int `json:"availableModels,omitempty"`
// ModelsLimitReached indicates whether the maxModels limit has been reached.
// When true, no new models will be created even if more matching images are discovered.
// +optional
ModelsLimitReached bool `json:"modelsLimitReached,omitempty"`
// Conditions represent the latest available observations of the source's state.
// Standard conditions: Ready, Syncing, RegistryReachable.
// +optional
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ObservedGeneration reflects the generation of the most recently observed spec.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
AIMClusterModelSourceStatus defines the observed state of AIMClusterModelSource.
func (*AIMClusterModelSourceStatus) DeepCopy ¶
func (in *AIMClusterModelSourceStatus) DeepCopy() *AIMClusterModelSourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterModelSourceStatus.
func (*AIMClusterModelSourceStatus) DeepCopyInto ¶
func (in *AIMClusterModelSourceStatus) DeepCopyInto(out *AIMClusterModelSourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterModelSourceStatus) GetConditions ¶
func (s *AIMClusterModelSourceStatus) GetConditions() []metav1.Condition
GetConditions returns the status conditions.
func (*AIMClusterModelSourceStatus) SetConditions ¶
func (s *AIMClusterModelSourceStatus) SetConditions(conditions []metav1.Condition)
SetConditions sets the status conditions.
func (*AIMClusterModelSourceStatus) SetStatus ¶
func (s *AIMClusterModelSourceStatus) SetStatus(status string)
SetStatus sets the overall status string.
type AIMClusterRuntimeConfig ¶
type AIMClusterRuntimeConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMClusterRuntimeConfigSpec `json:"spec,omitempty"`
Status AIMRuntimeConfigStatus `json:"status,omitempty"`
}
AIMClusterRuntimeConfig is a cluster-scoped runtime configuration for AIM services, models, and templates.
Cluster-scoped runtime configs provide platform-wide defaults that apply to all namespaces, making them ideal for organization-level policies such as storage classes, discovery behavior, model creation scope, and routing configuration.
When both cluster and namespace runtime configs exist with the same name, the configs are merged, and the namespace-scoped AIMRuntimeConfig takes precedence for any field that is set in both. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName=aimclrc,categories=aim;all
func (*AIMClusterRuntimeConfig) DeepCopy ¶
func (in *AIMClusterRuntimeConfig) DeepCopy() *AIMClusterRuntimeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterRuntimeConfig.
func (*AIMClusterRuntimeConfig) DeepCopyInto ¶
func (in *AIMClusterRuntimeConfig) DeepCopyInto(out *AIMClusterRuntimeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterRuntimeConfig) DeepCopyObject ¶
func (in *AIMClusterRuntimeConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMClusterRuntimeConfigList ¶
type AIMClusterRuntimeConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMClusterRuntimeConfig `json:"items"`
}
AIMClusterRuntimeConfigList contains a list of AIMClusterRuntimeConfig. +kubebuilder:object:root=true
func (*AIMClusterRuntimeConfigList) DeepCopy ¶
func (in *AIMClusterRuntimeConfigList) DeepCopy() *AIMClusterRuntimeConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterRuntimeConfigList.
func (*AIMClusterRuntimeConfigList) DeepCopyInto ¶
func (in *AIMClusterRuntimeConfigList) DeepCopyInto(out *AIMClusterRuntimeConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterRuntimeConfigList) DeepCopyObject ¶
func (in *AIMClusterRuntimeConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMClusterRuntimeConfigSpec ¶
type AIMClusterRuntimeConfigSpec struct {
AIMRuntimeConfigCommon `json:",inline"`
}
AIMClusterRuntimeConfigSpec defines cluster-wide defaults for AIM resources.
func (*AIMClusterRuntimeConfigSpec) DeepCopy ¶
func (in *AIMClusterRuntimeConfigSpec) DeepCopy() *AIMClusterRuntimeConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterRuntimeConfigSpec.
func (*AIMClusterRuntimeConfigSpec) DeepCopyInto ¶
func (in *AIMClusterRuntimeConfigSpec) DeepCopyInto(out *AIMClusterRuntimeConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMClusterServiceTemplate ¶
type AIMClusterServiceTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMClusterServiceTemplateSpec `json:"spec,omitempty"`
Status AIMServiceTemplateStatus `json:"status,omitempty"`
}
AIMClusterServiceTemplate is a cluster-scoped template that defines runtime profiles for AIM services.
Cluster-scoped templates can be used by AIMServices in any namespace, making them ideal for platform-wide model configurations that should be shared across teams and projects. Unlike namespace-scoped AIMServiceTemplates, cluster templates do not support caching configuration and must be managed by cluster administrators, since caches themselves are namespace-scoped.
When both cluster and namespace templates exist with the same name, the namespace-scoped template takes precedence for services in that namespace. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,shortName=aimcltpl,categories=aim;all +kubebuilder:printcolumn:name="Model",type=string,JSONPath=`.spec.modelName` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Hardware",type=string,JSONPath=`.status.hardwareSummary` +kubebuilder:printcolumn:name="Metric",type=string,JSONPath=`.status.profile.metadata.metric` +kubebuilder:printcolumn:name="Precision",type=string,JSONPath=`.status.profile.metadata.precision`
func (*AIMClusterServiceTemplate) DeepCopy ¶
func (in *AIMClusterServiceTemplate) DeepCopy() *AIMClusterServiceTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterServiceTemplate.
func (*AIMClusterServiceTemplate) DeepCopyInto ¶
func (in *AIMClusterServiceTemplate) DeepCopyInto(out *AIMClusterServiceTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterServiceTemplate) DeepCopyObject ¶
func (in *AIMClusterServiceTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AIMClusterServiceTemplate) GetModelName ¶
func (t *AIMClusterServiceTemplate) GetModelName() string
func (*AIMClusterServiceTemplate) GetRuntimeConfigRef ¶
func (t *AIMClusterServiceTemplate) GetRuntimeConfigRef() RuntimeConfigRef
func (*AIMClusterServiceTemplate) GetSpecModelSources ¶
func (t *AIMClusterServiceTemplate) GetSpecModelSources() []AIMModelSource
func (*AIMClusterServiceTemplate) GetStatus ¶
func (t *AIMClusterServiceTemplate) GetStatus() *AIMServiceTemplateStatus
type AIMClusterServiceTemplateList ¶
type AIMClusterServiceTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMClusterServiceTemplate `json:"items"`
}
AIMClusterServiceTemplateList contains a list of AIMClusterServiceTemplate. +kubebuilder:object:root=true
func (*AIMClusterServiceTemplateList) DeepCopy ¶
func (in *AIMClusterServiceTemplateList) DeepCopy() *AIMClusterServiceTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterServiceTemplateList.
func (*AIMClusterServiceTemplateList) DeepCopyInto ¶
func (in *AIMClusterServiceTemplateList) DeepCopyInto(out *AIMClusterServiceTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMClusterServiceTemplateList) DeepCopyObject ¶
func (in *AIMClusterServiceTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMClusterServiceTemplateSpec ¶
type AIMClusterServiceTemplateSpec struct {
AIMServiceTemplateSpecCommon `json:",inline"`
}
AIMClusterServiceTemplateSpec defines the desired state of AIMClusterServiceTemplate (cluster-scoped).
A cluster-scoped template that selects a runtime profile for a given AIM model.
func (*AIMClusterServiceTemplateSpec) DeepCopy ¶
func (in *AIMClusterServiceTemplateSpec) DeepCopy() *AIMClusterServiceTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMClusterServiceTemplateSpec.
func (*AIMClusterServiceTemplateSpec) DeepCopyInto ¶
func (in *AIMClusterServiceTemplateSpec) DeepCopyInto(out *AIMClusterServiceTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMCpuRequirements ¶
type AIMCpuRequirements struct {
// Requests is the number of CPU cores to request. Required and must be > 0.
// +required
Requests resource.Quantity `json:"requests"`
// Limits is the maximum number of CPU cores to allow.
// +optional
Limits *resource.Quantity `json:"limits,omitempty"`
}
AIMCpuRequirements specifies CPU resource requirements.
func (*AIMCpuRequirements) DeepCopy ¶
func (in *AIMCpuRequirements) DeepCopy() *AIMCpuRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMCpuRequirements.
func (*AIMCpuRequirements) DeepCopyInto ¶
func (in *AIMCpuRequirements) DeepCopyInto(out *AIMCpuRequirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMCustomModelSpec ¶
type AIMCustomModelSpec struct {
// Hardware specifies default hardware requirements for all templates.
// Individual templates can override these defaults.
// Required when modelSources is set and customTemplates is empty.
// +optional
Hardware *AIMHardwareRequirements `json:"hardware,omitempty"`
// Type specifies default type for all templates.
// Individual templates can override this default.
// When nil, templates default to "unoptimized".
// +optional
// +kubebuilder:validation:Enum=optimized;preview;unoptimized
Type *AIMProfileType `json:"type,omitempty"`
}
AIMCustomModelSpec contains configuration for custom models. These fields are only used when modelSources is specified (custom models). For image-based models, these settings come from discovery.
func (*AIMCustomModelSpec) DeepCopy ¶
func (in *AIMCustomModelSpec) DeepCopy() *AIMCustomModelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMCustomModelSpec.
func (*AIMCustomModelSpec) DeepCopyInto ¶
func (in *AIMCustomModelSpec) DeepCopyInto(out *AIMCustomModelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMCustomTemplate ¶
type AIMCustomTemplate struct {
// Name is the template name. If not provided, auto-generated from model name + profile.
// +optional
// +kubebuilder:validation:MaxLength=63
Name string `json:"name,omitempty"`
// Type indicates the optimization status of this template.
// - optimized: Template has been tuned for performance
// - preview: Template is experimental/pre-release
// - unoptimized: Default, no specific optimizations applied
// +optional
// +kubebuilder:validation:Enum=optimized;preview;unoptimized
// +kubebuilder:default=unoptimized
Type AIMProfileType `json:"type,omitempty"`
// Env specifies environment variable overrides when this template is selected.
// +optional
// +listType=map
// +listMapKey=name
// +kubebuilder:validation:MaxItems=64
Env []corev1.EnvVar `json:"env,omitempty"`
// Hardware specifies GPU and CPU requirements for this template.
// Optional when spec.hardware is set (inherits from spec).
// When both are set, values are merged field-by-field with template taking precedence.
// +optional
Hardware *AIMHardwareRequirements `json:"hardware,omitempty"`
// Profile declares runtime profile variables for template selection.
// Used when multiple templates exist to select based on metric/precision.
// +optional
Profile *AIMTemplateProfile `json:"profile,omitempty"`
}
AIMCustomTemplate defines a custom template configuration for a model. When modelSources are specified directly on AIMModel, customTemplates allow defining explicit hardware requirements and profiles, skipping the discovery job.
func (*AIMCustomTemplate) DeepCopy ¶
func (in *AIMCustomTemplate) DeepCopy() *AIMCustomTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMCustomTemplate.
func (*AIMCustomTemplate) DeepCopyInto ¶
func (in *AIMCustomTemplate) DeepCopyInto(out *AIMCustomTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMDiscoveryProfile ¶
type AIMDiscoveryProfile struct {
// EngineArgs contains runtime-specific engine configuration as a free-form JSON object.
// The structure depends on the inference engine being used (e.g., vLLM, TGI).
// These arguments are passed to the runtime container to configure model loading and inference.
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
EngineArgs *apiextensionsv1.JSON `json:"engine_args,omitempty"`
// EnvVars contains environment variables required by the runtime for this profile.
// These may include engine-specific settings, optimization flags, or hardware configuration.
// +optional
EnvVars map[string]string `json:"env_vars,omitempty"`
// Metadata provides structured information about this deployment profile's characteristics.
Metadata AIMDiscoveryProfileMetadata `json:"metadata,omitempty"`
}
AIMDiscoveryProfile represents a deployment configuration discovered during image inspection. This is the raw output from a discovery job before it's processed and cached in a template.
Each profile represents a specific combination of optimization target (metric), precision, GPU type, and GPU count. A single image may produce multiple profiles for different hardware configurations.
Relationship to AIMProfile: - AIMDiscoveryProfile: Raw discovery job output, used during initial inspection - AIMProfile (in aimservicetemplate_types.go): Processed and cached in template status
Both types have identical structure but serve different lifecycle stages.
func (*AIMDiscoveryProfile) DeepCopy ¶
func (in *AIMDiscoveryProfile) DeepCopy() *AIMDiscoveryProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMDiscoveryProfile.
func (*AIMDiscoveryProfile) DeepCopyInto ¶
func (in *AIMDiscoveryProfile) DeepCopyInto(out *AIMDiscoveryProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMDiscoveryProfileMetadata ¶
type AIMDiscoveryProfileMetadata struct {
// Engine identifies the inference engine used for this profile (e.g., "vllm", "tgi").
// +optional
Engine string `json:"engine,omitempty"`
// GPU specifies the GPU model this profile is optimized for (e.g., "MI300X", "MI325X").
// +optional
GPU string `json:"gpu,omitempty"`
// GPUCount indicates how many GPUs are required per replica for this profile.
// +optional
GPUCount int32 `json:"gpu_count,omitempty"`
// Metric indicates the optimization goal for this profile ("latency" or "throughput").
// +optional
Metric AIMMetric `json:"metric,omitempty"`
// Precision specifies the numeric precision used in this profile (e.g., "fp16", "fp8").
// +optional
Precision AIMPrecision `json:"precision,omitempty"`
// Type specifies the optimization level of this profile (optimized, unoptimized, preview).
// +optional
Type AIMProfileType `json:"type,omitempty"`
}
AIMDiscoveryProfileMetadata describes the characteristics of a discovered deployment profile.
func (*AIMDiscoveryProfileMetadata) DeepCopy ¶
func (in *AIMDiscoveryProfileMetadata) DeepCopy() *AIMDiscoveryProfileMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMDiscoveryProfileMetadata.
func (*AIMDiscoveryProfileMetadata) DeepCopyInto ¶
func (in *AIMDiscoveryProfileMetadata) DeepCopyInto(out *AIMDiscoveryProfileMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMGpuRequirements ¶
type AIMGpuRequirements struct {
// Requests is the number of GPUs to set as requests/limits.
// Set to 0 to target GPU nodes without consuming GPU resources (useful for testing).
// +optional
// +kubebuilder:validation:Minimum=0
Requests int32 `json:"requests,omitempty"`
// Model limits deployment to a specific GPU model.
// Example: "MI300X"
// Cannot be combined with minVram.
// +optional
// +kubebuilder:validation:MaxLength=64
Model string `json:"model,omitempty"`
// MinVRAM limits deployment to GPUs having at least this much VRAM.
// Used for capacity planning when the model size is known but any GPU with
// sufficient VRAM is acceptable.
// Cannot be combined with model.
// +optional
MinVRAM *resource.Quantity `json:"minVram,omitempty"`
// ResourceName is the Kubernetes resource name for GPU resources.
// Defaults to "amd.com/gpu" if not specified.
// +optional
// +kubebuilder:default="amd.com/gpu"
ResourceName string `json:"resourceName,omitempty"`
}
AIMGpuRequirements specifies GPU resource requirements. +kubebuilder:validation:XValidation:rule="!(has(self.model) && size(self.model) > 0 && has(self.minVram))",message="model and minVram are mutually exclusive; specify either a specific GPU model OR a minimum VRAM requirement, not both"
func (*AIMGpuRequirements) DeepCopy ¶
func (in *AIMGpuRequirements) DeepCopy() *AIMGpuRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMGpuRequirements.
func (*AIMGpuRequirements) DeepCopyInto ¶
func (in *AIMGpuRequirements) DeepCopyInto(out *AIMGpuRequirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMHardwareRequirements ¶
type AIMHardwareRequirements struct {
// GPU specifies GPU requirements. If not set, no GPUs are requested (CPU-only model).
// +optional
GPU *AIMGpuRequirements `json:"gpu,omitempty"`
// CPU specifies CPU requirements.
// +optional
CPU *AIMCpuRequirements `json:"cpu,omitempty"`
}
AIMHardwareRequirements specifies compute resource requirements for custom models. Used in AIMModelSpec and AIMCustomTemplate to define GPU and CPU needs. +kubebuilder:validation:XValidation:rule="has(self.gpu) || has(self.cpu)",message="at least one of gpu or cpu must be specified"
func (*AIMHardwareRequirements) DeepCopy ¶
func (in *AIMHardwareRequirements) DeepCopy() *AIMHardwareRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMHardwareRequirements.
func (*AIMHardwareRequirements) DeepCopyInto ¶
func (in *AIMHardwareRequirements) DeepCopyInto(out *AIMHardwareRequirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMMetric ¶
type AIMMetric string
AIMMetric enumerates the targeted service characteristic +kubebuilder:validation:Enum=latency;throughput
type AIMModel ¶
type AIMModel struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMModelSpec `json:"spec,omitempty"`
Status AIMModelStatus `json:"status,omitempty"`
}
AIMModel is the Schema for namespace-scoped AIM model catalog entries. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=aimmdl,categories=aim;all +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Source",type=string,JSONPath=`.status.sourceType` +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.spec.image` +kubebuilder:printcolumn:name="Model",type=string,JSONPath=`.status.imageMetadata.model.canonicalName` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
func (*AIMModel) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMModel.
func (*AIMModel) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMModel) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AIMModel) GetRuntimeConfigRef ¶
func (img *AIMModel) GetRuntimeConfigRef() RuntimeConfigRef
func (*AIMModel) GetStatus ¶
func (img *AIMModel) GetStatus() *AIMModelStatus
type AIMModelConfig ¶
type AIMModelConfig struct {
// AutoDiscovery controls whether models run discovery by default.
// When true, models run discovery jobs to extract metadata and auto-create templates.
// When false, discovery is skipped. Discovery failures are non-fatal and reported via conditions.
// +optional
AutoDiscovery *bool `json:"autoDiscovery,omitempty"`
}
func (*AIMModelConfig) DeepCopy ¶
func (in *AIMModelConfig) DeepCopy() *AIMModelConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMModelConfig.
func (*AIMModelConfig) DeepCopyInto ¶
func (in *AIMModelConfig) DeepCopyInto(out *AIMModelConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMModelDiscoveryConfig ¶
type AIMModelDiscoveryConfig struct {
// ExtractMetadata controls whether metadata extraction runs for this model.
// During metadata extraction, the controller connects to the image registry and
// extracts the image's labels.
// +optional
// +kubebuilder:default=true
ExtractMetadata bool `json:"extractMetadata,omitempty"`
// CreateServiceTemplates controls whether (cluster) service templates are auto-created from the image metadata.
// +optional
// +kubebuilder:default=true
CreateServiceTemplates bool `json:"createServiceTemplates,omitempty"`
}
AIMModelDiscoveryConfig controls discovery behavior for a model.
func (*AIMModelDiscoveryConfig) DeepCopy ¶
func (in *AIMModelDiscoveryConfig) DeepCopy() *AIMModelDiscoveryConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMModelDiscoveryConfig.
func (*AIMModelDiscoveryConfig) DeepCopyInto ¶
func (in *AIMModelDiscoveryConfig) DeepCopyInto(out *AIMModelDiscoveryConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMModelList ¶
type AIMModelList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMModel `json:"items"`
}
AIMModelList contains a list of AIMModel. +kubebuilder:object:root=true
func (*AIMModelList) DeepCopy ¶
func (in *AIMModelList) DeepCopy() *AIMModelList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMModelList.
func (*AIMModelList) DeepCopyInto ¶
func (in *AIMModelList) DeepCopyInto(out *AIMModelList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMModelList) DeepCopyObject ¶
func (in *AIMModelList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMModelSource ¶
type AIMModelSource struct {
// ModelID is the canonical identifier in {org}/{name} format.
// Determines the cache mount path: /workspace/cache/{modelId}
// For HuggingFace sources, this typically mirrors the URI path (e.g., meta-llama/Llama-3-8B).
// For S3 sources, users define their own organizational structure.
// +required
// +kubebuilder:validation:Pattern=`^[a-zA-Z0-9_-]+/[a-zA-Z0-9._-]+$`
ModelID string `json:"modelId"`
// SourceURI is the location from which the model should be downloaded.
// Supported schemes:
// - hf://org/model - Hugging Face Hub model
// - s3://bucket/key - S3-compatible storage
// +kubebuilder:validation:Pattern=`^(hf|s3)://[^ \t\r\n]+$`
SourceURI string `json:"sourceUri"`
// Size is the expected storage space required for this model artifact.
// Used for PVC sizing and capacity planning during cache creation.
// Optional - if not specified, the download job will discover the size automatically.
// Can be set explicitly to pre-allocate storage or override auto-discovery.
// +optional
Size *resource.Quantity `json:"size,omitempty"`
// Env specifies per-source credential overrides.
// These variables are used for authentication when downloading this specific source.
// Takes precedence over base-level env for the same variable name.
// +optional
// +listType=map
// +listMapKey=name
Env []corev1.EnvVar `json:"env,omitempty"`
}
AIMModelSource describes a model artifact that must be downloaded for inference. Discovery extracts these from the container's configuration to enable caching and validation.
func (*AIMModelSource) DeepCopy ¶
func (in *AIMModelSource) DeepCopy() *AIMModelSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMModelSource.
func (*AIMModelSource) DeepCopyInto ¶
func (in *AIMModelSource) DeepCopyInto(out *AIMModelSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMModelSourceType ¶
type AIMModelSourceType string
AIMModelSourceType indicates how a model's artifacts are sourced. +kubebuilder:validation:Enum=Image;Custom
const ( // AIMModelSourceTypeImage indicates the model is discovered from container image labels. AIMModelSourceTypeImage AIMModelSourceType = "Image" // AIMModelSourceTypeCustom indicates the model uses explicit spec.modelSources. AIMModelSourceTypeCustom AIMModelSourceType = "Custom" )
type AIMModelSpec ¶
type AIMModelSpec struct {
// Image is the container image URI for this AIM model.
// This image is inspected by the operator to select runtime profiles used by templates.
// Discovery behavior is controlled by the discovery field and runtime config's AutoDiscovery setting.
// +kubebuilder:validation:MinLength=1
Image string `json:"image"`
// Discovery controls discovery behavior for this model.
// When unset, uses runtime config defaults.
// +optional
Discovery *AIMModelDiscoveryConfig `json:"discovery,omitempty"`
// DefaultServiceTemplate specifies the default AIMServiceTemplate to use when creating services for this model.
// When set, services that reference this model will use this template if no template is explicitly specified.
// If this is not set, a template will be automatically selected.
// +optional
DefaultServiceTemplate string `json:"defaultServiceTemplate,omitempty"`
// Custom contains configuration for custom models (models with inline modelSources).
// Only used when modelSources are specified; ignored for image-based models.
// +optional
Custom *AIMCustomModelSpec `json:"custom,omitempty"`
// CustomTemplates defines explicit template configurations for this model.
// These templates are created directly without running a discovery job.
// Can be used with or without modelSources to define custom deployment configurations.
// If omitted when modelSources is set, a single template is auto-generated
// using the custom.hardware requirements.
// +optional
// +kubebuilder:validation:MaxItems=16
CustomTemplates []AIMCustomTemplate `json:"customTemplates,omitempty"`
// ModelSources specifies the model sources to use for this model.
// When specified, these sources are used instead of auto-discovery from the container image.
// This enables pre-creating custom models with explicit model sources.
// The size field is optional - if not specified, it will be discovered by the download job.
// AIM runtime currently supports only one model source.
// +optional
// +kubebuilder:validation:MaxItems=1
ModelSources []AIMModelSource `json:"modelSources,omitempty"`
// RuntimeConfigRef contains the runtime config reference for this model, and is used to control discovery behavior.
RuntimeConfigRef `json:",inline"`
// ImagePullSecrets lists secrets containing credentials for pulling the model container image.
// These secrets are used for:
// - OCI registry metadata extraction during discovery
// - Pulling the image for inference services
// The secrets are merged with any runtime config defaults.
// For namespace-scoped models, secrets must exist in the same namespace.
// For cluster-scoped models, secrets must exist in the operator namespace.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// Env specifies environment variables for authentication during model discovery and metadata extraction.
// These variables are used for authentication with model registries (e.g., HuggingFace tokens).
// +optional
// +listType=map
// +listMapKey=name
Env []corev1.EnvVar `json:"env,omitempty"`
// ServiceAccountName specifies the Kubernetes service account to use for workloads related to this model.
// This includes metadata extraction jobs and any other model-related operations.
// If empty, the default service account for the namespace is used.
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// Resources defines the default resource requirements for services using this model.
// Template- or service-level values override these defaults.
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// ImageMetadata is the metadata that is used to determine which recommended service templates to create,
// and to drive clients with richer metadata regarding this particular model. For most cases the user does
// not need to set this field manually, for images that have the supported labels embedded in them
// the `AIM(Cluster)Model.status.imageMetadata` field is automatically filled from the container image labels.
// This field is intended to be used when there are network restrictions, or in other similar situations.
// If this field is set, the remote extraction will not be performed at all.
ImageMetadata *ImageMetadata `json:"imageMetadata,omitempty"`
}
AIMModelSpec defines the desired state of AIMModel. +kubebuilder:validation:XValidation:rule="!has(self.modelSources) || size(self.modelSources) == 0 || (has(self.custom) && has(self.custom.hardware)) || !has(self.customTemplates) || size(self.customTemplates) == 0 || self.customTemplates.all(t, has(t.hardware) || (has(self.custom) && has(self.custom.hardware)))",message="when using modelSources, hardware must be specified: set custom.hardware (inherited by all templates) or set hardware on each template individually"
func (*AIMModelSpec) DeepCopy ¶
func (in *AIMModelSpec) DeepCopy() *AIMModelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMModelSpec.
func (*AIMModelSpec) DeepCopyInto ¶
func (in *AIMModelSpec) DeepCopyInto(out *AIMModelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMModelSpec) ExpectsTemplates ¶
func (s *AIMModelSpec) ExpectsTemplates(status *AIMModelStatus) *bool
ExpectsTemplates returns whether this model should have auto-created templates. Returns:
- ptr to true: templates expected (has recommendedDeployments, creation enabled, customTemplates, or is custom model)
- ptr to false: no templates expected (no recommendedDeployments or creation disabled)
- nil: unknown (metadata not yet available for image-based models)
func (*AIMModelSpec) GetEffectiveImageMetadata ¶
func (s *AIMModelSpec) GetEffectiveImageMetadata(status *AIMModelStatus) *ImageMetadata
GetEffectiveImageMetadata returns metadata from spec (if provided) or status (if extracted). Spec takes precedence over status since it represents user intent.
func (*AIMModelSpec) ShouldCreateTemplates ¶
func (s *AIMModelSpec) ShouldCreateTemplates() bool
ShouldCreateTemplates returns whether template creation is enabled for this model. Returns true if discovery.createServiceTemplates is unset or true.
type AIMModelStatus ¶
type AIMModelStatus struct {
// ObservedGeneration is the most recent generation observed by the controller
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Status represents the overall status of the image based on its templates
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Progressing;Ready;Degraded;Failed;NotAvailable
Status constants.AIMStatus `json:"status,omitempty"`
// Conditions represent the latest available observations of the model's state
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ResolvedRuntimeConfig captures metadata about the runtime config that was resolved.
// +optional
ResolvedRuntimeConfig *AIMResolvedReference `json:"resolvedRuntimeConfig,omitempty"`
// ImageMetadata is the metadata extracted from an AIM image
// +optional
ImageMetadata *ImageMetadata `json:"imageMetadata,omitempty"`
// SourceType indicates how this model's artifacts are sourced.
// - "Image": Model discovered from container image labels
// - "Custom": Model uses explicit spec.modelSources
// Set by the controller based on whether spec.modelSources is populated.
// +optional
SourceType AIMModelSourceType `json:"sourceType,omitempty"`
}
AIMModelStatus defines the observed state of AIMModel.
func (*AIMModelStatus) DeepCopy ¶
func (in *AIMModelStatus) DeepCopy() *AIMModelStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMModelStatus.
func (*AIMModelStatus) DeepCopyInto ¶
func (in *AIMModelStatus) DeepCopyInto(out *AIMModelStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMModelStatus) GetAIMStatus ¶
func (s *AIMModelStatus) GetAIMStatus() constants.AIMStatus
func (*AIMModelStatus) GetConditions ¶
func (s *AIMModelStatus) GetConditions() []metav1.Condition
func (*AIMModelStatus) SetConditions ¶
func (s *AIMModelStatus) SetConditions(conditions []metav1.Condition)
func (*AIMModelStatus) SetStatus ¶
func (s *AIMModelStatus) SetStatus(status string)
type AIMPrecision ¶
type AIMPrecision string
AIMPrecision enumerates supported numeric precisions +kubebuilder:validation:Enum=auto;fp4;fp8;fp16;fp32;bf16;int4;int8
const ( AIMPrecisionAuto AIMPrecision = "auto" AIMPrecisionFP4 AIMPrecision = "fp4" AIMPrecisionFP8 AIMPrecision = "fp8" AIMPrecisionFP16 AIMPrecision = "fp16" AIMPrecisionFP32 AIMPrecision = "fp32" AIMPrecisionBF16 AIMPrecision = "bf16" AIMPrecisionInt4 AIMPrecision = "int4" AIMPrecisionInt8 AIMPrecision = "int8" )
type AIMProfile ¶
type AIMProfile struct {
// EngineArgs contains runtime-specific engine configuration as a free-form JSON object.
// The structure depends on the inference engine being used (e.g., vLLM, TGI).
// These arguments are passed to the runtime container to configure model loading and inference.
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
EngineArgs *apiextensionsv1.JSON `json:"engine_args,omitempty"`
// EnvVars contains environment variables required by the runtime for this profile.
// These may include engine-specific settings, optimization flags, or hardware configuration.
// +optional
EnvVars map[string]string `json:"env_vars,omitempty"`
// Metadata provides structured information about this deployment profile's characteristics.
Metadata AIMProfileMetadata `json:"metadata,omitempty"`
// OriginalDiscoveryOutput contains the raw discovery job JSON output.
// This preserves the complete discovery result from the dry-run container,
// including all fields that may not be mapped to structured fields above.
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
// +optional
OriginalDiscoveryOutput *apiextensionsv1.JSON `json:"originalDiscoveryOutput,omitempty"`
}
AIMProfile contains the cached discovery results for a template. This is the processed and validated version of AIMDiscoveryProfile that is stored in the template's status after successful discovery.
The profile serves as a cache of runtime configuration, eliminating the need to re-run discovery for each service that uses this template. Services and caching mechanisms reference this cached profile for deployment parameters and model sources.
See discovery.go for AIMDiscoveryProfile (the raw discovery output) and the relationship between these types.
func (*AIMProfile) DeepCopy ¶
func (in *AIMProfile) DeepCopy() *AIMProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMProfile.
func (*AIMProfile) DeepCopyInto ¶
func (in *AIMProfile) DeepCopyInto(out *AIMProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMProfileMetadata ¶
type AIMProfileMetadata struct {
// Engine identifies the inference engine used for this profile (e.g., "vllm", "tgi").
// +optional
Engine string `json:"engine,omitempty"`
// GPU specifies the GPU model this profile is optimized for (e.g., "MI300X", "MI325X").
// +optional
GPU string `json:"gpu,omitempty"`
// GPUCount indicates how many GPUs are required per replica for this profile.
// +optional
GPUCount int32 `json:"gpuCount,omitempty"`
// Metric indicates the optimization goal for this profile ("latency" or "throughput").
// +optional
Metric AIMMetric `json:"metric,omitempty"`
// Precision specifies the numeric precision used in this profile (e.g., "fp16", "fp8").
// +optional
Precision AIMPrecision `json:"precision,omitempty"`
// Type indicates the optimization level of this profile (optimized, preview, unoptimized).
// +optional
Type AIMProfileType `json:"type,omitempty"`
}
AIMProfileMetadata describes the characteristics of a cached deployment profile. This is identical to AIMDiscoveryProfileMetadata but exists in the template status namespace.
func (*AIMProfileMetadata) DeepCopy ¶
func (in *AIMProfileMetadata) DeepCopy() *AIMProfileMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMProfileMetadata.
func (*AIMProfileMetadata) DeepCopyInto ¶
func (in *AIMProfileMetadata) DeepCopyInto(out *AIMProfileMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMProfileType ¶
type AIMProfileType string
AIMProfileType indicates the optimization level of a deployment profile. +kubebuilder:validation:Enum=optimized;preview;unoptimized
const ( // AIMProfileTypeOptimized indicates the profile has been fully optimized. AIMProfileTypeOptimized AIMProfileType = "optimized" // AIMProfileTypePreview indicates the profile is in preview/beta state. AIMProfileTypePreview AIMProfileType = "preview" // AIMProfileTypeUnoptimized indicates the profile has not been optimized. AIMProfileTypeUnoptimized AIMProfileType = "unoptimized" )
type AIMResolutionScope ¶
type AIMResolutionScope string
AIMResolutionScope describes the scope of a resolved reference. +kubebuilder:validation:Enum=Namespace;Cluster;Merged;Unknown
const ( // AIMResolutionScopeNamespace denotes a namespace-scoped resource. AIMResolutionScopeNamespace AIMResolutionScope = "Namespace" // AIMResolutionScopeCluster denotes a cluster-scoped resource. AIMResolutionScopeCluster AIMResolutionScope = "Cluster" // AIMResolutionScopeMerged denotes that both cluster and namespace configs were merged. AIMResolutionScopeMerged AIMResolutionScope = "Merged" // AIMResolutionScopeUnknown denotes that the scope could not be determined. AIMResolutionScopeUnknown AIMResolutionScope = "Unknown" )
type AIMResolvedArtifact ¶
type AIMResolvedArtifact struct {
// UID of the AIMArtifact resource
UID string `json:"uid"`
// Name of the AIMArtifact resource
Name string `json:"name"`
// Model is the name of the model that is cached
Model string `json:"model"`
// Status of the artifact
Status constants.AIMStatus `json:"status"`
// PersistentVolumeClaim name if available
PersistentVolumeClaim string `json:"persistentVolumeClaim,omitempty"`
// MountPoint is the mount point for the artifact
MountPoint string `json:"mountPoint,omitempty"`
}
func (*AIMResolvedArtifact) DeepCopy ¶
func (in *AIMResolvedArtifact) DeepCopy() *AIMResolvedArtifact
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMResolvedArtifact.
func (*AIMResolvedArtifact) DeepCopyInto ¶
func (in *AIMResolvedArtifact) DeepCopyInto(out *AIMResolvedArtifact)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMResolvedReference ¶
type AIMResolvedReference struct {
// Name is the resource name that satisfied the reference.
Name string `json:"name,omitempty"`
// Namespace identifies where the resource was found when namespace-scoped.
// Empty indicates a cluster-scoped resource.
Namespace string `json:"namespace,omitempty"`
// Scope indicates whether the resolved resource was namespace or cluster scoped.
Scope AIMResolutionScope `json:"scope,omitempty"`
// Kind is the fully-qualified kind of the resolved reference, when known.
// +optional
Kind string `json:"kind,omitempty"`
// UID captures the unique identifier of the resolved reference, when known.
// +optional
UID types.UID `json:"uid,omitempty"`
}
AIMResolvedReference captures metadata about a resolved reference.
func CreateResolvedReference ¶
func CreateResolvedReference(obj client.Object) AIMResolvedReference
func (*AIMResolvedReference) DeepCopy ¶
func (in *AIMResolvedReference) DeepCopy() *AIMResolvedReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMResolvedReference.
func (*AIMResolvedReference) DeepCopyInto ¶
func (in *AIMResolvedReference) DeepCopyInto(out *AIMResolvedReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMResolvedReference) NamespacedName ¶
func (r *AIMResolvedReference) NamespacedName() types.NamespacedName
type AIMRuntimeConfig ¶
type AIMRuntimeConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMRuntimeConfigSpec `json:"spec,omitempty"`
Status AIMRuntimeConfigStatus `json:"status,omitempty"`
}
AIMRuntimeConfig is the Schema for namespace-scoped AIM runtime configurations. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=aimrc,categories=aim;all
func (*AIMRuntimeConfig) DeepCopy ¶
func (in *AIMRuntimeConfig) DeepCopy() *AIMRuntimeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMRuntimeConfig.
func (*AIMRuntimeConfig) DeepCopyInto ¶
func (in *AIMRuntimeConfig) DeepCopyInto(out *AIMRuntimeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMRuntimeConfig) DeepCopyObject ¶
func (in *AIMRuntimeConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMRuntimeConfigCommon ¶
type AIMRuntimeConfigCommon struct {
AIMServiceRuntimeConfig `json:",inline"`
// Model controls model creation and discovery defaults.
// This field only applies to RuntimeConfig/ClusterRuntimeConfig and is not available for services.
// +optional
Model *AIMModelConfig `json:"model,omitempty"`
// LabelPropagation controls how labels from parent AIM resources are propagated to child resources.
// When enabled, labels matching the specified patterns are automatically copied from parent resources
// (e.g., AIMService, AIMTemplateCache) to their child resources (e.g., Deployments, Services, PVCs).
// This is useful for propagating organizational metadata like cost centers, team identifiers,
// or compliance labels through the resource hierarchy.
// +optional
LabelPropagation *AIMRuntimeConfigLabelPropagationSpec `json:"labelPropagation,omitempty"`
// DEPRECATED: Use Storage.DefaultStorageClassName instead. This field will be removed in a future version.
// For backward compatibility, if this field is set and Storage.DefaultStorageClassName is not set,
// the value will be automatically migrated.
// +optional
// +kubebuilder:validation:Deprecated
// +kubebuilder:validation:DeprecatedMessage="Use Storage.DefaultStorageClassName instead. This field will be removed in a future version."
DefaultStorageClassName string `json:"defaultStorageClassName,omitempty"`
// DEPRECATED: Use Storage.PVCHeadroomPercent instead. This field will be removed in a future version.
// For backward compatibility, if this field is set and Storage.PVCHeadroomPercent is not set,
// the value will be automatically migrated.
// +optional
// +kubebuilder:validation:Deprecated
// +kubebuilder:validation:DeprecatedMessage="Use Storage.PVCHeadroomPercent instead. This field will be removed in a future version."
PVCHeadroomPercent *int32 `json:"pvcHeadroomPercent,omitempty"`
}
AIMRuntimeConfigCommon captures configuration fields shared across cluster and namespace scopes. These settings apply to both AIMRuntimeConfig (namespace-scoped) and AIMClusterRuntimeConfig (cluster-scoped). It embeds AIMServiceRuntimeConfig which contains fields that can also be overridden at the service level.
func (*AIMRuntimeConfigCommon) DeepCopy ¶
func (in *AIMRuntimeConfigCommon) DeepCopy() *AIMRuntimeConfigCommon
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMRuntimeConfigCommon.
func (*AIMRuntimeConfigCommon) DeepCopyInto ¶
func (in *AIMRuntimeConfigCommon) DeepCopyInto(out *AIMRuntimeConfigCommon)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMRuntimeConfigLabelPropagationSpec ¶
type AIMRuntimeConfigLabelPropagationSpec struct {
// Enabled, if true, allows propagating parent labels to all child resources it creates directly
// Only label keys that match the ones in Match are propagated.
// +kubebuilder:default=false
// +optional
Enabled bool `json:"enabled,omitempty"`
// Match is a list of label keys that will be propagated to any child resources created.
// Wildcards are supported, so for example `org.my/my-key-*` would match any label with that prefix.
// +optional
Match []string `json:"match,omitempty"`
}
func (*AIMRuntimeConfigLabelPropagationSpec) DeepCopy ¶
func (in *AIMRuntimeConfigLabelPropagationSpec) DeepCopy() *AIMRuntimeConfigLabelPropagationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMRuntimeConfigLabelPropagationSpec.
func (*AIMRuntimeConfigLabelPropagationSpec) DeepCopyInto ¶
func (in *AIMRuntimeConfigLabelPropagationSpec) DeepCopyInto(out *AIMRuntimeConfigLabelPropagationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMRuntimeConfigList ¶
type AIMRuntimeConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMRuntimeConfig `json:"items"`
}
AIMRuntimeConfigList contains a list of AIMRuntimeConfig. +kubebuilder:object:root=true
func (*AIMRuntimeConfigList) DeepCopy ¶
func (in *AIMRuntimeConfigList) DeepCopy() *AIMRuntimeConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMRuntimeConfigList.
func (*AIMRuntimeConfigList) DeepCopyInto ¶
func (in *AIMRuntimeConfigList) DeepCopyInto(out *AIMRuntimeConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMRuntimeConfigList) DeepCopyObject ¶
func (in *AIMRuntimeConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMRuntimeConfigSpec ¶
type AIMRuntimeConfigSpec struct {
AIMRuntimeConfigCommon `json:",inline"`
}
AIMRuntimeConfigSpec defines namespace-scoped overrides for AIM resources.
func (*AIMRuntimeConfigSpec) DeepCopy ¶
func (in *AIMRuntimeConfigSpec) DeepCopy() *AIMRuntimeConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMRuntimeConfigSpec.
func (*AIMRuntimeConfigSpec) DeepCopyInto ¶
func (in *AIMRuntimeConfigSpec) DeepCopyInto(out *AIMRuntimeConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMRuntimeConfigStatus ¶
type AIMRuntimeConfigStatus struct {
// ObservedGeneration is the last reconciled generation.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions communicate reconciliation progress.
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
AIMRuntimeConfigStatus records the resolved config reference surfaced to consumers.
func (*AIMRuntimeConfigStatus) DeepCopy ¶
func (in *AIMRuntimeConfigStatus) DeepCopy() *AIMRuntimeConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMRuntimeConfigStatus.
func (*AIMRuntimeConfigStatus) DeepCopyInto ¶
func (in *AIMRuntimeConfigStatus) DeepCopyInto(out *AIMRuntimeConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMRuntimeParameters ¶
type AIMRuntimeParameters struct {
// Metric selects the optimization goal.
//
// - `latency`: prioritize low end‑to‑end latency
// - `throughput`: prioritize sustained requests/second
//
// +optional
// +kubebuilder:validation:Enum=latency;throughput
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="metric is immutable"
Metric *AIMMetric `json:"metric,omitempty"`
// Precision selects the numeric precision used by the runtime.
// +optional
// +kubebuilder:validation:Enum=auto;fp4;fp8;fp16;fp32;bf16;int4;int8
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="precision is immutable"
Precision *AIMPrecision `json:"precision,omitempty"`
// Hardware specifies GPU and CPU requirements for each replica.
// For GPU models, defines the GPU count and model types required for deployment.
// For CPU-only models, defines CPU resource requirements.
// This field is immutable after creation.
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="hardware is immutable"
Hardware *AIMHardwareRequirements `json:"hardware,omitempty"`
}
AIMRuntimeParameters contains the runtime configuration parameters shared across templates and services. Fields use pointers to allow optional usage in different contexts (required in templates, optional in service overrides).
func (*AIMRuntimeParameters) DeepCopy ¶
func (in *AIMRuntimeParameters) DeepCopy() *AIMRuntimeParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMRuntimeParameters.
func (*AIMRuntimeParameters) DeepCopyInto ¶
func (in *AIMRuntimeParameters) DeepCopyInto(out *AIMRuntimeParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMRuntimeRoutingConfig ¶
type AIMRuntimeRoutingConfig struct {
// Enabled controls whether HTTP routing is managed for inference services using this config.
// When true, the operator creates HTTPRoute resources for services that reference this config.
// When false or unset, routing must be explicitly enabled on each service.
// This provides a namespace or cluster-wide default that individual services can override.
// +optional
Enabled *bool `json:"enabled,omitempty"`
// GatewayRef specifies the Gateway API Gateway resource that should receive HTTPRoutes.
// This identifies the parent gateway for routing traffic to inference services.
// The gateway can be in any namespace (cross-namespace references are supported).
// If routing is enabled but GatewayRef is not specified, service reconciliation will fail
// with a validation error.
// +optional
GatewayRef *gatewayapiv1.ParentReference `json:"gatewayRef,omitempty"`
// PathTemplate defines the HTTP path template for routes, evaluated using JSONPath expressions.
// The template is rendered against the AIMService object to generate unique paths.
//
// Example templates:
// - `/{.metadata.namespace}/{.metadata.name}` - namespace and service name
// - `/{.metadata.namespace}/{.metadata.labels['team']}/inference` - with label
// - `/models/{.metadata.name}` - based on service name
//
// The template must:
// - Use valid JSONPath expressions wrapped in {...}
// - Reference fields that exist on the service
// - Produce a path ≤ 200 characters after rendering
// - Result in valid URL path segments (lowercase, RFC 1123 compliant)
//
// If evaluation fails, the service enters Degraded state with PathTemplateInvalid reason.
// Individual services can override this template via spec.routing.pathTemplate.
// +optional
PathTemplate *string `json:"pathTemplate,omitempty"`
// RequestTimeout defines the HTTP request timeout for routes.
// This sets the maximum duration for a request to complete before timing out.
// The timeout applies to the entire request/response cycle.
// If not specified, no timeout is set on the route.
// Individual services can override this value via spec.routing.requestTimeout.
// +optional
RequestTimeout *metav1.Duration `json:"requestTimeout,omitempty"`
// Annotations defines default annotations to add to all HTTPRoute resources.
// Services can add additional annotations or override these via spec.routingAnnotations.
// When both are specified, service annotations take precedence for conflicting keys.
// Common use cases include ingress controller settings, rate limiting, monitoring labels,
// and security policies that should apply to all services using this config.
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}
AIMRuntimeRoutingConfig configures HTTP routing defaults for inference services. These settings control how Gateway API HTTPRoutes are created and configured.
func (*AIMRuntimeRoutingConfig) DeepCopy ¶
func (in *AIMRuntimeRoutingConfig) DeepCopy() *AIMRuntimeRoutingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMRuntimeRoutingConfig.
func (*AIMRuntimeRoutingConfig) DeepCopyInto ¶
func (in *AIMRuntimeRoutingConfig) DeepCopyInto(out *AIMRuntimeRoutingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMService ¶
type AIMService struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMServiceSpec `json:"spec,omitempty"`
Status AIMServiceStatus `json:"status,omitempty"`
}
AIMService manages a KServe-based AIM inference service for the selected model and template. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=aimsvc,categories=aim;all +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Model",type=string,JSONPath=`.status.resolvedModel.name` +kubebuilder:printcolumn:name="Template",type=string,JSONPath=`.status.resolvedTemplate.name` +kubebuilder:printcolumn:name="Replicas",type=string,JSONPath=`.status.runtime.replicas` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` Note: KServe uses {name}-{namespace} format which must not exceed 63 characters. This constraint is validated at runtime since CEL cannot access metadata.namespace.
func (*AIMService) DeepCopy ¶
func (in *AIMService) DeepCopy() *AIMService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMService.
func (*AIMService) DeepCopyInto ¶
func (in *AIMService) DeepCopyInto(out *AIMService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMService) DeepCopyObject ¶
func (in *AIMService) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AIMService) GetRuntimeConfigRef ¶
func (s *AIMService) GetRuntimeConfigRef() RuntimeConfigRef
func (*AIMService) GetStatus ¶
func (svc *AIMService) GetStatus() *AIMServiceStatus
GetStatus returns a pointer to the AIMService status.
type AIMServiceAutoScaling ¶
type AIMServiceAutoScaling struct {
// Metrics is a list of metrics to be used for autoscaling.
// Each metric defines a source (PodMetric) and target values.
// +optional
Metrics []AIMServiceMetricsSpec `json:"metrics,omitempty"`
}
AIMServiceAutoScaling configures KEDA-based autoscaling with custom metrics. This enables automatic scaling based on metrics collected from OpenTelemetry.
func (*AIMServiceAutoScaling) DeepCopy ¶
func (in *AIMServiceAutoScaling) DeepCopy() *AIMServiceAutoScaling
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceAutoScaling.
func (*AIMServiceAutoScaling) DeepCopyInto ¶
func (in *AIMServiceAutoScaling) DeepCopyInto(out *AIMServiceAutoScaling)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceCacheStatus ¶
type AIMServiceCacheStatus struct {
// TemplateCacheRef references the TemplateCache being used, if any.
// +optional
TemplateCacheRef *AIMResolvedReference `json:"templateCacheRef,omitempty"`
// RetryAttempts tracks how many times this service has attempted to retry a failed cache.
// Each service gets exactly one retry attempt. When a TemplateCache enters Failed state,
// this counter is incremented from 0 to 1 after deleting failed Artifacts.
// If the retry fails (cache enters Failed again with attempts == 1), the service degrades.
// +optional
RetryAttempts int `json:"retryAttempts,omitempty"`
}
AIMServiceCacheStatus captures cache-related status for an AIMService.
func (*AIMServiceCacheStatus) DeepCopy ¶
func (in *AIMServiceCacheStatus) DeepCopy() *AIMServiceCacheStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceCacheStatus.
func (*AIMServiceCacheStatus) DeepCopyInto ¶
func (in *AIMServiceCacheStatus) DeepCopyInto(out *AIMServiceCacheStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceCachingConfig ¶
type AIMServiceCachingConfig struct {
// Mode controls when to use caching.
// Canonical values:
// - Shared (default): reuse/create shared cache assets
// - Dedicated: create service-owned dedicated cache assets
//
// Legacy values are accepted and normalized:
// - Always -> Shared
// - Auto -> Shared
// - Never -> Dedicated
// +kubebuilder:default=Shared
// +optional
Mode AIMCachingMode `json:"mode,omitempty"`
}
AIMServiceCachingConfig controls caching behavior for a service. +kubebuilder:validation:XValidation:rule="self == oldSelf",message="caching mode is immutable after creation"
func (*AIMServiceCachingConfig) DeepCopy ¶
func (in *AIMServiceCachingConfig) DeepCopy() *AIMServiceCachingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceCachingConfig.
func (*AIMServiceCachingConfig) DeepCopyInto ¶
func (in *AIMServiceCachingConfig) DeepCopyInto(out *AIMServiceCachingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceList ¶
type AIMServiceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMService `json:"items"`
}
+kubebuilder:object:root=true AIMServiceList contains a list of AIMService.
func (*AIMServiceList) DeepCopy ¶
func (in *AIMServiceList) DeepCopy() *AIMServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceList.
func (*AIMServiceList) DeepCopyInto ¶
func (in *AIMServiceList) DeepCopyInto(out *AIMServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMServiceList) DeepCopyObject ¶
func (in *AIMServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMServiceMetricTarget ¶
type AIMServiceMetricTarget struct {
// Type specifies how to interpret the metric value.
// "Value": absolute value target (use Value field)
// "AverageValue": average value across all pods (use AverageValue field)
// "Utilization": percentage utilization for resource metrics (use AverageUtilization field)
// +kubebuilder:validation:Enum=Value;AverageValue;Utilization
Type string `json:"type"`
// Value is the target value of the metric (as a quantity).
// Used when Type is "Value".
// Example: "1" for 1 request, "100m" for 100 millicores
// +optional
Value string `json:"value,omitempty"`
// AverageValue is the target value of the average of the metric across all relevant pods (as a quantity).
// Used when Type is "AverageValue".
// Example: "100m" for 100 millicores per pod
// +optional
AverageValue string `json:"averageValue,omitempty"`
// AverageUtilization is the target value of the average of the resource metric across all relevant pods,
// represented as a percentage of the requested value of the resource for the pods.
// Used when Type is "Utilization". Only valid for Resource metric source type.
// Example: 80 for 80% utilization
// +optional
AverageUtilization *int32 `json:"averageUtilization,omitempty"`
}
AIMServiceMetricTarget defines the target value for a metric. Specifies how the metric value should be interpreted and what target to maintain.
func (*AIMServiceMetricTarget) DeepCopy ¶
func (in *AIMServiceMetricTarget) DeepCopy() *AIMServiceMetricTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceMetricTarget.
func (*AIMServiceMetricTarget) DeepCopyInto ¶
func (in *AIMServiceMetricTarget) DeepCopyInto(out *AIMServiceMetricTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceMetricsSpec ¶
type AIMServiceMetricsSpec struct {
// Type is the type of metric source.
// Valid values: "PodMetric" (per-pod custom metrics).
// +kubebuilder:validation:Enum=PodMetric
Type string `json:"type"`
// PodMetric refers to a metric describing each pod in the current scale target.
// Used when Type is "PodMetric". Supports backends like OpenTelemetry for custom metrics.
// +optional
PodMetric *AIMServicePodMetricSource `json:"podmetric,omitempty"`
}
AIMServiceMetricsSpec defines a single metric for autoscaling. Specifies the metric source type and configuration.
func (*AIMServiceMetricsSpec) DeepCopy ¶
func (in *AIMServiceMetricsSpec) DeepCopy() *AIMServiceMetricsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceMetricsSpec.
func (*AIMServiceMetricsSpec) DeepCopyInto ¶
func (in *AIMServiceMetricsSpec) DeepCopyInto(out *AIMServiceMetricsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceModel ¶
type AIMServiceModel struct {
// Name references an existing AIMModel or AIMClusterModel by metadata.name.
// The controller looks for a namespace-scoped AIMModel first, then falls back to cluster-scoped AIMClusterModel.
// Example: `meta-llama-3-8b`
// +optional
Name *string `json:"name,omitempty"`
// Image specifies a container image URI directly.
// The controller searches for an existing model with this image, or creates one if none exists.
// Auto-created models are namespace-scoped and can be reused by other services.
// Example: `ghcr.io/silogen/llama-3-8b:v1.2.0`
// +optional
Image *string `json:"image,omitempty"`
// Custom specifies a custom model configuration with explicit base image,
// model sources, and hardware requirements. The controller will search for
// an existing matching AIMModel or auto-create one if not found.
// +optional
Custom *AIMServiceModelCustom `json:"custom,omitempty"`
}
AIMServiceModel specifies which model to deploy. Exactly one field must be set. +kubebuilder:validation:XValidation:rule="(has(self.name) ? 1 : 0) + (has(self.image) ? 1 : 0) + (has(self.custom) ? 1 : 0) == 1",message="exactly one of name, image, or custom must be specified" +kubebuilder:validation:XValidation:rule="self == oldSelf",message="model selection is immutable after creation"
func (*AIMServiceModel) DeepCopy ¶
func (in *AIMServiceModel) DeepCopy() *AIMServiceModel
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceModel.
func (*AIMServiceModel) DeepCopyInto ¶
func (in *AIMServiceModel) DeepCopyInto(out *AIMServiceModel)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceModelCustom ¶
type AIMServiceModelCustom struct {
// BaseImage is the container image URI for the AIM base image.
// This will be used as the image for the auto-created AIMModel.
// Example: `ghcr.io/silogen/aim-base:0.7.0`
// +required
BaseImage string `json:"baseImage"`
// ModelSources specifies the model sources to use.
// The controller will search for or create an AIMModel with these sources.
// The size field is optional - if not specified, it will be discovered by the download job.
// AIM runtime currently supports only one model source.
// +required
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=1
ModelSources []AIMModelSource `json:"modelSources"`
// Hardware specifies the GPU and CPU requirements for this custom model.
// GPU is optional - if not set, no GPUs are requested (CPU-only model).
// +required
Hardware AIMHardwareRequirements `json:"hardware"`
}
AIMServiceModelCustom specifies a custom model configuration with explicit base image, model sources, and hardware requirements. Used for ad-hoc custom model deployments. +kubebuilder:validation:XValidation:rule="size(self.modelSources) >= 1",message="at least one model source must be specified"
func (*AIMServiceModelCustom) DeepCopy ¶
func (in *AIMServiceModelCustom) DeepCopy() *AIMServiceModelCustom
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceModelCustom.
func (*AIMServiceModelCustom) DeepCopyInto ¶
func (in *AIMServiceModelCustom) DeepCopyInto(out *AIMServiceModelCustom)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceOverrides ¶
type AIMServiceOverrides struct {
AIMRuntimeParameters `json:",inline"`
}
AIMServiceOverrides allows overriding template parameters at the service level. All fields are optional. When specified, they override the corresponding values from the referenced AIMServiceTemplate.
func (*AIMServiceOverrides) DeepCopy ¶
func (in *AIMServiceOverrides) DeepCopy() *AIMServiceOverrides
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceOverrides.
func (*AIMServiceOverrides) DeepCopyInto ¶
func (in *AIMServiceOverrides) DeepCopyInto(out *AIMServiceOverrides)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServicePodMetric ¶
type AIMServicePodMetric struct {
// Backend defines the metrics backend to use.
// If not specified, defaults to "opentelemetry".
// +kubebuilder:validation:Enum=opentelemetry
// +kubebuilder:default=opentelemetry
// +optional
Backend string `json:"backend,omitempty"`
// ServerAddress specifies the address of the metrics backend server.
// If not specified, defaults to "keda-otel-scaler.keda.svc:4317" for OpenTelemetry backend.
// +optional
ServerAddress string `json:"serverAddress,omitempty"`
// MetricNames specifies which metrics to collect from pods and send to ServerAddress.
// Example: ["vllm:num_requests_running"]
// +optional
MetricNames []string `json:"metricNames,omitempty"`
// Query specifies the query to run to retrieve metrics from the backend.
// The query syntax depends on the backend being used.
// Example: "vllm:num_requests_running" for OpenTelemetry.
// +optional
Query string `json:"query,omitempty"`
// OperationOverTime specifies the operation to aggregate metrics over time.
// Valid values: "last_one", "avg", "max", "min", "rate", "count"
// Default: "last_one"
// +optional
OperationOverTime string `json:"operationOverTime,omitempty"`
}
AIMServicePodMetric identifies the pod metric and its backend. Supports multiple metrics backends including OpenTelemetry.
func (*AIMServicePodMetric) DeepCopy ¶
func (in *AIMServicePodMetric) DeepCopy() *AIMServicePodMetric
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServicePodMetric.
func (*AIMServicePodMetric) DeepCopyInto ¶
func (in *AIMServicePodMetric) DeepCopyInto(out *AIMServicePodMetric)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServicePodMetricSource ¶
type AIMServicePodMetricSource struct {
// Metric contains the metric identification and backend configuration.
// Defines which metrics to collect and how to query them.
Metric *AIMServicePodMetric `json:"metric"`
// Target specifies the target value for the metric.
// The autoscaler will scale to maintain this target value.
Target *AIMServiceMetricTarget `json:"target"`
}
AIMServicePodMetricSource defines pod-level metrics configuration. Specifies the metric identification and target values for pod-based autoscaling.
func (*AIMServicePodMetricSource) DeepCopy ¶
func (in *AIMServicePodMetricSource) DeepCopy() *AIMServicePodMetricSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServicePodMetricSource.
func (*AIMServicePodMetricSource) DeepCopyInto ¶
func (in *AIMServicePodMetricSource) DeepCopyInto(out *AIMServicePodMetricSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceRoutingStatus ¶
type AIMServiceRoutingStatus struct {
// Path is the HTTP path prefix used when routing is enabled.
// Example: `/tenant/svc-uuid`
// +optional
Path string `json:"path,omitempty"`
}
AIMServiceRoutingStatus captures observed routing details.
func (*AIMServiceRoutingStatus) DeepCopy ¶
func (in *AIMServiceRoutingStatus) DeepCopy() *AIMServiceRoutingStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceRoutingStatus.
func (*AIMServiceRoutingStatus) DeepCopyInto ¶
func (in *AIMServiceRoutingStatus) DeepCopyInto(out *AIMServiceRoutingStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceRuntimeConfig ¶
type AIMServiceRuntimeConfig struct {
// Storage configures storage defaults for this service's PVCs and caches.
// When set, these values override namespace/cluster runtime config defaults.
// +optional
Storage *AIMStorageConfig `json:"storage,omitempty"`
// Routing controls HTTP routing configuration for this service.
// When set, these values override namespace/cluster runtime config defaults.
// +optional
Routing *AIMRuntimeRoutingConfig `json:"routing,omitempty"`
// Env specifies environment variables for inference containers.
// When set on AIMService, these take highest precedence in the merge hierarchy.
// When set on RuntimeConfig, these provide namespace/cluster-level defaults.
// Merge order (highest to lowest): Service.Env > Template.Env > RuntimeConfig.Env > Profile.Env
// +optional
// +listType=map
// +listMapKey=name
Env []corev1.EnvVar `json:"env,omitempty"`
}
AIMServiceRuntimeConfig contains runtime configuration fields that apply to services. This struct is shared between AIMService.spec (inlined) and AIMRuntimeConfigCommon, allowing services to override these specific runtime settings while inheriting defaults from namespace/cluster RuntimeConfigs.
func (*AIMServiceRuntimeConfig) DeepCopy ¶
func (in *AIMServiceRuntimeConfig) DeepCopy() *AIMServiceRuntimeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceRuntimeConfig.
func (*AIMServiceRuntimeConfig) DeepCopyInto ¶
func (in *AIMServiceRuntimeConfig) DeepCopyInto(out *AIMServiceRuntimeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceRuntimeStatus ¶
type AIMServiceRuntimeStatus struct {
// CurrentReplicas is the current number of replicas as reported by the HPA.
// +optional
CurrentReplicas int32 `json:"currentReplicas,omitempty"`
// DesiredReplicas is the desired number of replicas as determined by the HPA.
// +optional
DesiredReplicas int32 `json:"desiredReplicas,omitempty"`
// MinReplicas is the minimum number of replicas configured for autoscaling.
// +optional
MinReplicas int32 `json:"minReplicas,omitempty"`
// MaxReplicas is the maximum number of replicas configured for autoscaling.
// +optional
MaxReplicas int32 `json:"maxReplicas,omitempty"`
// Replicas is a formatted display string for kubectl output.
// Shows "current" for fixed replicas or "current/desired (min-max)" for autoscaling.
// +optional
Replicas string `json:"replicas,omitempty"`
}
AIMServiceRuntimeStatus captures runtime status including replica counts from HPA.
func (*AIMServiceRuntimeStatus) DeepCopy ¶
func (in *AIMServiceRuntimeStatus) DeepCopy() *AIMServiceRuntimeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceRuntimeStatus.
func (*AIMServiceRuntimeStatus) DeepCopyInto ¶
func (in *AIMServiceRuntimeStatus) DeepCopyInto(out *AIMServiceRuntimeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceSpec ¶
type AIMServiceSpec struct {
// Model specifies which model to deploy using one of the available reference methods.
// Use `name` to reference an existing AIMModel/AIMClusterModel by name, or use `image`
// to specify a container image URI directly (which will auto-create a model if needed).
Model AIMServiceModel `json:"model"`
// Template contains template selection and configuration.
// Use Template.Name to specify an explicit template, or omit to auto-select.
// +optional
Template AIMServiceTemplateConfig `json:"template,omitempty"`
// Caching controls caching behavior for this service.
// When nil, defaults to Shared mode.
// +optional
Caching *AIMServiceCachingConfig `json:"caching,omitempty"`
// DEPRECATED: Use Caching.Mode instead. This field will be removed in a future version.
// This field is no longer honored by the controller.
// +optional
// +kubebuilder:validation:Deprecated
// +kubebuilder:validation:DeprecatedMessage="Use Caching.Mode instead. This field will be removed in a future version."
CacheModel *bool `json:"cacheModel,omitempty"`
// Replicas specifies the number of replicas for this service.
// When not specified, defaults to 1 replica.
// This value overrides any replica settings from the template.
// For autoscaling, use MinReplicas and MaxReplicas instead.
// +optional
// +kubebuilder:default=1
Replicas *int32 `json:"replicas,omitempty"`
// MinReplicas specifies the minimum number of replicas for autoscaling.
// Defaults to 1. Scale to zero is not supported.
// When specified with MaxReplicas, enables autoscaling for the service.
// +optional
// +kubebuilder:validation:Minimum=1
MinReplicas *int32 `json:"minReplicas,omitempty"`
// MaxReplicas specifies the maximum number of replicas for autoscaling.
// Required when MinReplicas is set or when AutoScaling configuration is provided.
// +optional
// +kubebuilder:validation:Minimum=1
MaxReplicas *int32 `json:"maxReplicas,omitempty"`
// AutoScaling configures advanced autoscaling behavior using KEDA.
// Supports custom metrics from OpenTelemetry backend.
// When specified, MinReplicas and MaxReplicas should also be set.
// +optional
AutoScaling *AIMServiceAutoScaling `json:"autoScaling,omitempty"`
// RuntimeConfigRef contains the runtime config reference for this service.
// The result of the merged runtime configs is merged with the inline AIMServiceRuntimeConfig configuration.
RuntimeConfigRef `json:",inline"`
// Inline AIMServiceRuntimeConfig fields for cleaner access
AIMServiceRuntimeConfig `json:",inline"`
// Resources overrides the container resource requirements for this service.
// When specified, these values take precedence over the template and image defaults.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// Overrides allows overriding specific template parameters for this service.
// When specified, these values take precedence over the template values.
// +optional
Overrides *AIMServiceOverrides `json:"overrides,omitempty"`
// ImagePullSecrets references secrets for pulling AIM container images.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// ServiceAccountName specifies the Kubernetes service account to use for the inference workload.
// This service account is used by the deployed inference pods.
// If empty, the default service account for the namespace is used.
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
}
AIMServiceSpec defines the desired state of AIMService.
Binds a canonical model to an AIMServiceTemplate and configures replicas, caching behavior, and optional overrides. The template governs the base runtime selection knobs, while the overrides field allows service-specific customization.
func (*AIMServiceSpec) DeepCopy ¶
func (in *AIMServiceSpec) DeepCopy() *AIMServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceSpec.
func (*AIMServiceSpec) DeepCopyInto ¶
func (in *AIMServiceSpec) DeepCopyInto(out *AIMServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMServiceSpec) GetCachingMode ¶
func (spec *AIMServiceSpec) GetCachingMode() AIMCachingMode
GetCachingMode returns the effective canonical caching mode for this service. Legacy values are normalized for backward compatibility.
type AIMServiceStatus ¶
type AIMServiceStatus struct {
// ObservedGeneration is the most recent generation observed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions represent the latest observations of template state.
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ResolvedRuntimeConfig captures metadata about the runtime config that was resolved.
// +optional
ResolvedRuntimeConfig *AIMResolvedReference `json:"resolvedRuntimeConfig,omitempty"`
// ResolvedModel captures metadata about the image that was resolved.
// +optional
ResolvedModel *AIMResolvedReference `json:"resolvedModel,omitempty"`
// Status represents the current high‑level status of the service lifecycle.
// Values: `Pending`, `Starting`, `Running`, `Degraded`, `Failed`.
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Starting;Running;Degraded;Failed
Status constants.AIMStatus `json:"status,omitempty"`
// Routing surfaces information about the configured HTTP routing, when enabled.
// +optional
Routing *AIMServiceRoutingStatus `json:"routing,omitempty"`
// ResolvedTemplate captures metadata about the template that satisfied the reference.
ResolvedTemplate *AIMResolvedReference `json:"resolvedTemplate,omitempty"`
// Cache captures cache-related status for this service.
// +optional
Cache *AIMServiceCacheStatus `json:"cache,omitempty"`
// Runtime captures runtime status including replica counts.
// +optional
Runtime *AIMServiceRuntimeStatus `json:"runtime,omitempty"`
}
AIMServiceStatus defines the observed state of AIMService.
func (*AIMServiceStatus) DeepCopy ¶
func (in *AIMServiceStatus) DeepCopy() *AIMServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceStatus.
func (*AIMServiceStatus) DeepCopyInto ¶
func (in *AIMServiceStatus) DeepCopyInto(out *AIMServiceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMServiceStatus) GetAIMStatus ¶
func (s *AIMServiceStatus) GetAIMStatus() constants.AIMStatus
func (*AIMServiceStatus) GetConditions ¶
func (s *AIMServiceStatus) GetConditions() []metav1.Condition
func (*AIMServiceStatus) SetConditions ¶
func (s *AIMServiceStatus) SetConditions(conditions []metav1.Condition)
func (*AIMServiceStatus) SetStatus ¶
func (s *AIMServiceStatus) SetStatus(status string)
type AIMServiceStatusEnum ¶
type AIMServiceStatusEnum string
AIMServiceStatusEnum defines coarse-grained states for a service. +kubebuilder:validation:Enum=Pending;Starting;Running;Failed;Degraded
type AIMServiceTemplate ¶
type AIMServiceTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMServiceTemplateSpec `json:"spec,omitempty"`
Status AIMServiceTemplateStatus `json:"status,omitempty"`
}
AIMServiceTemplate is the Schema for namespace-scoped AIM service templates. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=aimtpl,categories=aim;all +kubebuilder:printcolumn:name="Model",type=string,JSONPath=`.spec.modelName` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Hardware",type=string,JSONPath=`.status.hardwareSummary` +kubebuilder:printcolumn:name="Metric",type=string,JSONPath=`.status.profile.metadata.metric` +kubebuilder:printcolumn:name="Precision",type=string,JSONPath=`.status.profile.metadata.precision`
func (*AIMServiceTemplate) DeepCopy ¶
func (in *AIMServiceTemplate) DeepCopy() *AIMServiceTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceTemplate.
func (*AIMServiceTemplate) DeepCopyInto ¶
func (in *AIMServiceTemplate) DeepCopyInto(out *AIMServiceTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMServiceTemplate) DeepCopyObject ¶
func (in *AIMServiceTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AIMServiceTemplate) GetModelName ¶
func (t *AIMServiceTemplate) GetModelName() string
func (*AIMServiceTemplate) GetRuntimeConfigRef ¶
func (t *AIMServiceTemplate) GetRuntimeConfigRef() RuntimeConfigRef
func (*AIMServiceTemplate) GetSpecModelSources ¶
func (t *AIMServiceTemplate) GetSpecModelSources() []AIMModelSource
func (*AIMServiceTemplate) GetStatus ¶
func (t *AIMServiceTemplate) GetStatus() *AIMServiceTemplateStatus
type AIMServiceTemplateConfig ¶
type AIMServiceTemplateConfig struct {
// Name is the name of the AIMServiceTemplate or AIMClusterServiceTemplate to use.
// The template selects the runtime profile and GPU parameters.
// When not specified, a template will be automatically selected based on the model.
// +optional
Name string `json:"name,omitempty"`
// AllowUnoptimized, if true, will allow automatic selection of templates
// that resolve to an unoptimized profile.
// +optional
AllowUnoptimized bool `json:"allowUnoptimized,omitempty"`
}
AIMServiceTemplateConfig contains template selection configuration for AIMService. +kubebuilder:validation:XValidation:rule="self == oldSelf",message="template selection is immutable after creation"
func (*AIMServiceTemplateConfig) DeepCopy ¶
func (in *AIMServiceTemplateConfig) DeepCopy() *AIMServiceTemplateConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceTemplateConfig.
func (*AIMServiceTemplateConfig) DeepCopyInto ¶
func (in *AIMServiceTemplateConfig) DeepCopyInto(out *AIMServiceTemplateConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceTemplateList ¶
type AIMServiceTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMServiceTemplate `json:"items"`
}
AIMServiceTemplateList contains a list of AIMServiceTemplate. +kubebuilder:object:root=true
func (*AIMServiceTemplateList) DeepCopy ¶
func (in *AIMServiceTemplateList) DeepCopy() *AIMServiceTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceTemplateList.
func (*AIMServiceTemplateList) DeepCopyInto ¶
func (in *AIMServiceTemplateList) DeepCopyInto(out *AIMServiceTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMServiceTemplateList) DeepCopyObject ¶
func (in *AIMServiceTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMServiceTemplateScope ¶
type AIMServiceTemplateScope string
AIMServiceTemplateScope is retained for backwards compatibility with existing consumers. +kubebuilder:validation:Enum=Namespace;Cluster;Unknown
const ( // AIMServiceTemplateScopeNamespace denotes a namespace-scoped template. AIMServiceTemplateScopeNamespace AIMServiceTemplateScope = AIMServiceTemplateScope(AIMResolutionScopeNamespace) // AIMServiceTemplateScopeCluster denotes a cluster-scoped template. AIMServiceTemplateScopeCluster AIMServiceTemplateScope = AIMServiceTemplateScope(AIMResolutionScopeCluster) // AIMServiceTemplateScopeUnknown denotes that the scope could not be resolved. AIMServiceTemplateScopeUnknown AIMServiceTemplateScope = AIMServiceTemplateScope(AIMResolutionScopeUnknown) )
type AIMServiceTemplateSpec ¶
type AIMServiceTemplateSpec struct {
AIMServiceTemplateSpecCommon `json:",inline"`
// Caching configures model caching behavior for this namespace-scoped template.
// When enabled, models will be cached using the specified environment variables
// during download.
// +optional
Caching *AIMTemplateCachingConfig `json:"caching,omitempty"`
}
AIMServiceTemplateSpec defines the desired state of AIMServiceTemplate (namespace-scoped).
A namespaced and versioned template that selects a runtime profile for a given AIM model (by canonical name). Templates are intentionally narrow: they describe runtime selection knobs for the AIM container and do not redefine the full Kubernetes deployment shape.
func (*AIMServiceTemplateSpec) DeepCopy ¶
func (in *AIMServiceTemplateSpec) DeepCopy() *AIMServiceTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceTemplateSpec.
func (*AIMServiceTemplateSpec) DeepCopyInto ¶
func (in *AIMServiceTemplateSpec) DeepCopyInto(out *AIMServiceTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceTemplateSpecCommon ¶
type AIMServiceTemplateSpecCommon struct {
// ModelName is the model name. Matches `metadata.name` of an AIMModel or AIMClusterModel. Immutable.
//
// Example: `meta/llama-3-8b:1.1+20240915`
//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="model name is immutable"
ModelName string `json:"modelName"`
AIMRuntimeParameters `json:",inline"`
// RuntimeConfigRef contains the runtime config reference for this service template
RuntimeConfigRef `json:",inline"`
// ImagePullSecrets lists secrets containing credentials for pulling container images.
// These secrets are used for:
// - Discovery dry-run jobs that inspect the model container
// - Pulling the image for inference services
// The secrets are merged with any model or runtime config defaults.
// For namespace-scoped templates, secrets must exist in the same namespace.
// For cluster-scoped templates, secrets must exist in the operator namespace.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// ServiceAccountName specifies the Kubernetes service account to use for workloads related to this template.
// This includes discovery dry-run jobs and inference services created from this template.
// If empty, the default service account for the namespace is used.
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// Resources defines the default container resource requirements applied to services derived from this template.
// Service-specific values override the template defaults.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// ModelSources specifies the model sources required to run this template.
// When provided, the discovery dry-run will be skipped and these sources will be used directly.
// This allows users to explicitly declare model dependencies without requiring a discovery job.
// If omitted, a discovery job will be run to automatically determine the required model sources.
// +optional
ModelSources []AIMModelSource `json:"modelSources,omitempty"`
// ProfileId is the specific AIM profile ID that this template should use.
// When set, the discovery job will be instructed to use this specific profile.
// +optional
ProfileId string `json:"profileId,omitempty"`
// Type indicates the optimization level of this template.
// - optimized: Template has been tuned for performance
// - preview: Template is experimental/pre-release
// - unoptimized: Default, no specific optimizations applied
// When nil, the type is determined by discovery. When set, overrides discovery.
// +optional
// +kubebuilder:validation:Enum=optimized;preview;unoptimized
Type *AIMProfileType `json:"type,omitempty"`
// Env specifies environment variables for inference containers.
// These variables are passed to the inference runtime and can be used
// to configure runtime behavior, authentication, or other settings.
// +optional
// +listType=map
// +listMapKey=name
Env []corev1.EnvVar `json:"env,omitempty"`
}
func (*AIMServiceTemplateSpecCommon) DeepCopy ¶
func (in *AIMServiceTemplateSpecCommon) DeepCopy() *AIMServiceTemplateSpecCommon
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceTemplateSpecCommon.
func (*AIMServiceTemplateSpecCommon) DeepCopyInto ¶
func (in *AIMServiceTemplateSpecCommon) DeepCopyInto(out *AIMServiceTemplateSpecCommon)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMServiceTemplateStatus ¶
type AIMServiceTemplateStatus struct {
// ObservedGeneration is the most recent generation observed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions represent the latest observations of template state.
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ResolvedRuntimeConfig captures metadata about the runtime config that was resolved.
// +optional
ResolvedRuntimeConfig *AIMResolvedReference `json:"resolvedRuntimeConfig,omitempty"`
// ResolvedModel captures metadata about the image that was resolved.
// +optional
ResolvedModel *AIMResolvedReference `json:"resolvedModel,omitempty"`
// ResolvedCache captures metadata about which cache is used for this template
// +optional
ResolvedCache *AIMResolvedReference `json:"resolvedCache,omitempty"`
// ResolvedHardware contains the resolved hardware requirements for this template.
// These values are computed from discovery results and spec defaults, and represent
// what will actually be used when creating InferenceServices.
// Resolution order: discovery output > spec values > defaults.
// +optional
ResolvedHardware *AIMHardwareRequirements `json:"resolvedHardware,omitempty"`
// ResolvedNodeAffinity contains the computed node affinity rules for GPU scheduling.
// This is derived from GPU model and minVRAM requirements, merged with any user-specified
// affinity from the spec. The service controller uses this directly when creating InferenceServices.
// +optional
ResolvedNodeAffinity *corev1.NodeAffinity `json:"resolvedNodeAffinity,omitempty"`
// HardwareSummary is a human-readable display string for the hardware requirements.
// Format: "{count} x {model}" for GPU (e.g., "2 x MI300X") or "CPU" for CPU-only.
// This is a computed field for display purposes only.
// +optional
HardwareSummary string `json:"hardwareSummary,omitempty"`
// Status represents the current high‑level status of the template lifecycle.
// Values: `Pending`, `Progressing`, `Ready`, `Degraded`, `Failed`.
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Progressing;Ready;Degraded;Failed;NotAvailable
Status constants.AIMStatus `json:"status,omitempty"`
// ModelSources list the models that this template requires to run. These are the models that will be
// cached, if this template is cached.
ModelSources []AIMModelSource `json:"modelSources,omitempty"`
// Profile contains the full discovery result profile as a free-form JSON object.
// This includes metadata, engine args, environment variables, and model details.
Profile *AIMProfile `json:"profile,omitempty"`
// DiscoveryJob is a reference to the job that was run for discovery
DiscoveryJob *AIMResolvedReference `json:"discoveryJob,omitempty"`
// Discovery contains state tracking for the discovery process, including
// retry attempts and backoff timing for the circuit breaker pattern.
// +optional
Discovery *DiscoveryState `json:"discovery,omitempty"`
}
AIMServiceTemplateStatus defines the observed state of AIMServiceTemplate.
func (*AIMServiceTemplateStatus) DeepCopy ¶
func (in *AIMServiceTemplateStatus) DeepCopy() *AIMServiceTemplateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMServiceTemplateStatus.
func (*AIMServiceTemplateStatus) DeepCopyInto ¶
func (in *AIMServiceTemplateStatus) DeepCopyInto(out *AIMServiceTemplateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMServiceTemplateStatus) GetAIMStatus ¶
func (s *AIMServiceTemplateStatus) GetAIMStatus() constants.AIMStatus
func (*AIMServiceTemplateStatus) GetConditions ¶
func (s *AIMServiceTemplateStatus) GetConditions() []metav1.Condition
func (*AIMServiceTemplateStatus) SetConditions ¶
func (s *AIMServiceTemplateStatus) SetConditions(conditions []metav1.Condition)
func (*AIMServiceTemplateStatus) SetStatus ¶
func (s *AIMServiceTemplateStatus) SetStatus(status string)
type AIMStorageConfig ¶
type AIMStorageConfig struct {
// DefaultStorageClassName specifies the storage class to use for artifacts and PVCs
// when the consuming resource (AIMArtifact, AIMTemplateCache, AIMServiceTemplate) does not
// specify a storage class. If this field is empty, the cluster's default storage class is used.
// +optional
DefaultStorageClassName *string `json:"defaultStorageClassName,omitempty"`
// PVCHeadroomPercent specifies the percentage of extra space to add to PVCs
// for model storage. This accounts for filesystem overhead and temporary files
// during model loading. The value represents a percentage (e.g., 10 means 10% extra space).
// If not specified, defaults to 10%.
// +kubebuilder:default=10
// +kubebuilder:validation:Minimum=0
// +optional
PVCHeadroomPercent *int32 `json:"pvcHeadroomPercent,omitempty"`
}
AIMStorageConfig configures storage defaults for artifacts and PVCs.
func (*AIMStorageConfig) DeepCopy ¶
func (in *AIMStorageConfig) DeepCopy() *AIMStorageConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMStorageConfig.
func (*AIMStorageConfig) DeepCopyInto ¶
func (in *AIMStorageConfig) DeepCopyInto(out *AIMStorageConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMTemplateCache ¶
type AIMTemplateCache struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AIMTemplateCacheSpec `json:"spec,omitempty"`
Status AIMTemplateCacheStatus `json:"status,omitempty"`
}
+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:shortName=aimtc,categories=aim;all +kubebuilder:printcolumn:name="Template",type=string,JSONPath=`.spec.templateName` +kubebuilder:printcolumn:name="Mode",type=string,JSONPath=`.spec.mode` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=`.status.resolvedTemplateKind` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` AIMTemplateCache pre-warms artifacts for a specified template.
func (*AIMTemplateCache) DeepCopy ¶
func (in *AIMTemplateCache) DeepCopy() *AIMTemplateCache
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMTemplateCache.
func (*AIMTemplateCache) DeepCopyInto ¶
func (in *AIMTemplateCache) DeepCopyInto(out *AIMTemplateCache)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMTemplateCache) DeepCopyObject ¶
func (in *AIMTemplateCache) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*AIMTemplateCache) GetRuntimeConfigRef ¶
func (t *AIMTemplateCache) GetRuntimeConfigRef() RuntimeConfigRef
func (*AIMTemplateCache) GetStatus ¶
func (t *AIMTemplateCache) GetStatus() *AIMTemplateCacheStatus
type AIMTemplateCacheList ¶
type AIMTemplateCacheList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AIMTemplateCache `json:"items"`
}
+kubebuilder:object:root=true AIMTemplateCacheList contains a list of AIMTemplateCache.
func (*AIMTemplateCacheList) DeepCopy ¶
func (in *AIMTemplateCacheList) DeepCopy() *AIMTemplateCacheList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMTemplateCacheList.
func (*AIMTemplateCacheList) DeepCopyInto ¶
func (in *AIMTemplateCacheList) DeepCopyInto(out *AIMTemplateCacheList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMTemplateCacheList) DeepCopyObject ¶
func (in *AIMTemplateCacheList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AIMTemplateCacheMode ¶
type AIMTemplateCacheMode string
AIMTemplateCacheMode controls the ownership behavior of artifacts created by a template cache. +kubebuilder:validation:Enum=Dedicated;Shared
const ( // TemplateCacheModeDedicated means artifacts have owner references to the template cache. // When the template cache is deleted, all its artifacts are garbage collected. // Use this mode for service-specific caches that should be cleaned up with the service. TemplateCacheModeDedicated AIMTemplateCacheMode = "Dedicated" // artifacts persist independently of template cache lifecycle and can be shared. // This is the default mode for long-lived, reusable caches. TemplateCacheModeShared AIMTemplateCacheMode = "Shared" )
type AIMTemplateCacheSpec ¶
type AIMTemplateCacheSpec struct {
// TemplateName is the name of the AIMServiceTemplate or AIMClusterServiceTemplate to cache.
// The controller will first look for a namespace-scoped AIMServiceTemplate in the same namespace.
// If not found, it will look for a cluster-scoped AIMClusterServiceTemplate with the same name.
// Namespace-scoped templates take priority over cluster-scoped templates.
// +kubebuilder:validation:MinLength=1
TemplateName string `json:"templateName"`
// TemplateScope indicates whether the template is namespace-scoped or cluster-scoped.
// This field is set by the controller during template resolution.
// +required
TemplateScope AIMServiceTemplateScope `json:"templateScope"`
// Env specifies environment variables to use for authentication when downloading models.
// These variables are used for authentication with model registries (e.g., HuggingFace tokens).
// +optional
// +listType=map
// +listMapKey=name
Env []corev1.EnvVar `json:"env,omitempty"`
// ImagePullSecrets references secrets for pulling AIM container images.
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// StorageClassName specifies the storage class for cache volumes.
// When not specified, uses the cluster default storage class.
// +optional
StorageClassName string `json:"storageClassName,omitempty"`
// DownloadImage specifies the container image used to download and initialize artifacts.
// When not specified, the controller uses the default model download image.
// +optional
DownloadImage string `json:"downloadImage,omitempty"`
// ModelSources specifies the model sources to cache for this template.
// These sources are typically copied from the resolved template's model sources.
// +optional
ModelSources []AIMModelSource `json:"modelSources,omitempty"`
// RuntimeConfigRef contains the runtime config reference for this template cache.
RuntimeConfigRef `json:",inline"`
// Mode controls the ownership behavior of artifacts created by this template cache.
// - Dedicated: artifacts are owned by this template cache and garbage collected when it's deleted.
// - Shared (default): artifacts have no owner references and persist independently.
// When a Shared template cache encounters artifacts with owner references, it promotes them
// to shared by removing the owner references, ensuring they persist for long-term use.
// +kubebuilder:default=Shared
// +optional
Mode AIMTemplateCacheMode `json:"mode,omitempty"`
}
AIMTemplateCacheSpec defines the desired state of AIMTemplateCache
func (*AIMTemplateCacheSpec) DeepCopy ¶
func (in *AIMTemplateCacheSpec) DeepCopy() *AIMTemplateCacheSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMTemplateCacheSpec.
func (*AIMTemplateCacheSpec) DeepCopyInto ¶
func (in *AIMTemplateCacheSpec) DeepCopyInto(out *AIMTemplateCacheSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMTemplateCacheStatus ¶
type AIMTemplateCacheStatus struct {
// ObservedGeneration is the most recent generation observed by the controller.
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Conditions represent the latest observations of the template cache state.
// +listType=map
// +listMapKey=type
Conditions []metav1.Condition `json:"conditions,omitempty"`
// ResolvedRuntimeConfig captures metadata about the runtime config that was resolved.
// +optional
ResolvedRuntimeConfig *AIMResolvedReference `json:"resolvedRuntimeConfig,omitempty"`
// Status represents the current high-level status of the template cache.
// +kubebuilder:default=Pending
// +kubebuilder:validation:Enum=Pending;Progressing;Ready;Failed;Degraded;NotAvailable
Status constants.AIMStatus `json:"status,omitempty"`
// ResolvedTemplateKind indicates whether the template resolved to a namespace-scoped
// AIMServiceTemplate or cluster-scoped AIMClusterServiceTemplate.
// Values: "AIMServiceTemplate", "AIMClusterServiceTemplate"
ResolvedTemplateKind string `json:"resolvedTemplateKind,omitempty"`
// Artifacts maps model names to their resolved AIMArtifact resources.
// +optional
Artifacts map[string]AIMResolvedArtifact `json:"artifacts,omitempty"`
}
AIMTemplateCacheStatus defines the observed state of AIMTemplateCache
func (*AIMTemplateCacheStatus) DeepCopy ¶
func (in *AIMTemplateCacheStatus) DeepCopy() *AIMTemplateCacheStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMTemplateCacheStatus.
func (*AIMTemplateCacheStatus) DeepCopyInto ¶
func (in *AIMTemplateCacheStatus) DeepCopyInto(out *AIMTemplateCacheStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AIMTemplateCacheStatus) GetAIMStatus ¶
func (s *AIMTemplateCacheStatus) GetAIMStatus() constants.AIMStatus
func (*AIMTemplateCacheStatus) GetConditions ¶
func (s *AIMTemplateCacheStatus) GetConditions() []metav1.Condition
func (*AIMTemplateCacheStatus) SetConditions ¶
func (s *AIMTemplateCacheStatus) SetConditions(conditions []metav1.Condition)
func (*AIMTemplateCacheStatus) SetStatus ¶
func (s *AIMTemplateCacheStatus) SetStatus(status string)
type AIMTemplateCachingConfig ¶
type AIMTemplateCachingConfig struct {
// Enabled controls whether caching is enabled for this template.
// Defaults to `false`.
// +kubebuilder:default=false
Enabled bool `json:"enabled,omitempty"`
// Env specifies environment variables to use when downloading the model for caching.
// These variables are available to the model download process and can be used
// to configure download behavior, authentication, proxies, etc.
// If not set, falls back to the template's top-level Env field.
// +optional
// +listType=map
// +listMapKey=name
Env []corev1.EnvVar `json:"env,omitempty"`
}
AIMTemplateCachingConfig configures model caching behavior for namespace-scoped templates.
func (*AIMTemplateCachingConfig) DeepCopy ¶
func (in *AIMTemplateCachingConfig) DeepCopy() *AIMTemplateCachingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMTemplateCachingConfig.
func (*AIMTemplateCachingConfig) DeepCopyInto ¶
func (in *AIMTemplateCachingConfig) DeepCopyInto(out *AIMTemplateCachingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMTemplateCandidateResult ¶
type AIMTemplateCandidateResult struct {
// Name is the name of the template candidate.
Name string `json:"name"`
// Status indicates whether the candidate was "chosen" or "rejected".
Status string `json:"status"`
// Reason provides a CamelCase reason for the evaluation result.
Reason string `json:"reason,omitempty"`
}
AIMTemplateCandidateResult represents the evaluation result for a template candidate during template selection.
func (*AIMTemplateCandidateResult) DeepCopy ¶
func (in *AIMTemplateCandidateResult) DeepCopy() *AIMTemplateCandidateResult
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMTemplateCandidateResult.
func (*AIMTemplateCandidateResult) DeepCopyInto ¶
func (in *AIMTemplateCandidateResult) DeepCopyInto(out *AIMTemplateCandidateResult)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMTemplateProfile ¶
type AIMTemplateProfile struct {
// Metric specifies the optimization target (e.g., latency, throughput).
// +optional
// +kubebuilder:validation:Enum=latency;throughput
Metric AIMMetric `json:"metric,omitempty"`
// Precision specifies the numerical precision (e.g., fp8, fp16, bf16).
// +optional
// +kubebuilder:validation:Enum=auto;fp4;fp8;fp16;fp32;bf16;int4;int8
Precision AIMPrecision `json:"precision,omitempty"`
}
AIMTemplateProfile declares profile variables for template selection. Used in AIMCustomTemplate to specify optimization targets.
func (*AIMTemplateProfile) DeepCopy ¶
func (in *AIMTemplateProfile) DeepCopy() *AIMTemplateProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMTemplateProfile.
func (*AIMTemplateProfile) DeepCopyInto ¶
func (in *AIMTemplateProfile) DeepCopyInto(out *AIMTemplateProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DiscoveryState ¶
type DiscoveryState struct {
// Attempts is the number of discovery job attempts that have been made.
// This counter increments each time a new discovery job is created after a failure.
// +optional
Attempts int32 `json:"attempts,omitempty"`
// LastAttemptTime is the timestamp of the most recent discovery job creation.
// Used to calculate exponential backoff before the next retry.
// +optional
LastAttemptTime *metav1.Time `json:"lastAttemptTime,omitempty"`
// LastFailureReason captures the reason for the most recent discovery failure.
// Used to classify failures as terminal vs transient.
// +optional
LastFailureReason string `json:"lastFailureReason,omitempty"`
// SpecHash is a hash of the template spec fields that affect discovery.
// When the spec changes, the circuit breaker resets to allow fresh attempts.
// +optional
SpecHash string `json:"specHash,omitempty"`
}
DiscoveryState tracks the discovery process state for circuit breaker logic. This enables exponential backoff and prevents infinite retry loops when discovery jobs fail persistently.
func (*DiscoveryState) DeepCopy ¶
func (in *DiscoveryState) DeepCopy() *DiscoveryState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryState.
func (*DiscoveryState) DeepCopyInto ¶
func (in *DiscoveryState) DeepCopyInto(out *DiscoveryState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DownloadProgress ¶
type DownloadProgress struct {
// TotalBytes is the expected total size of the download in bytes
// +optional
TotalBytes int64 `json:"totalBytes,omitempty"`
// DownloadedBytes is the number of bytes downloaded so far
// +optional
DownloadedBytes int64 `json:"downloadedBytes,omitempty"`
// Percentage is the download progress as a percentage (0-100)
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=100
Percentage int32 `json:"percentage,omitempty"`
// DisplayPercentage is a human-readable progress string (e.g., "45 %")
// This field is automatically populated from Progress.Percentage
// +optional
DisplayPercentage string `json:"displayPercentage,omitempty"`
}
DownloadProgress represents the download progress for a artifact
func (*DownloadProgress) DeepCopy ¶
func (in *DownloadProgress) DeepCopy() *DownloadProgress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadProgress.
func (*DownloadProgress) DeepCopyInto ¶
func (in *DownloadProgress) DeepCopyInto(out *DownloadProgress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DownloadState ¶
type DownloadState struct {
// Protocol is the download protocol currently in use (e.g., "XET", "HF_TRANSFER", "HTTP")
// +optional
Protocol string `json:"protocol,omitempty"`
// Attempt is the current attempt number (1-based)
// +optional
Attempt int32 `json:"attempt,omitempty"`
// TotalAttempts is the total number of attempts configured via AIM_DOWNLOADER_PROTOCOL
// +optional
TotalAttempts int32 `json:"totalAttempts,omitempty"`
// ProtocolSequence is the configured protocol sequence (e.g., "HF_TRANSFER,XET")
// +optional
ProtocolSequence string `json:"protocolSequence,omitempty"`
// Message is a human-readable status message from the downloader
// +optional
Message string `json:"message,omitempty"`
}
DownloadState represents the current download attempt state, updated by the downloader pod
func (*DownloadState) DeepCopy ¶
func (in *DownloadState) DeepCopy() *DownloadState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownloadState.
func (*DownloadState) DeepCopyInto ¶
func (in *DownloadState) DeepCopyInto(out *DownloadState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageMetadata ¶
type ImageMetadata struct {
// Model contains AMD Silogen model-specific metadata.
// +optional
Model *ModelMetadata `json:"model,omitempty"`
// OCI contains standard OCI image metadata.
// +optional
OCI *OCIMetadata `json:"oci,omitempty"`
// OriginalLabels contains the raw OCI image labels as a JSON object.
// This preserves all labels from the image, including those not mapped to structured fields.
// +optional
OriginalLabels map[string]string `json:"originalLabels,omitempty"`
}
ImageMetadata contains metadata extracted from or provided for a container image.
func (*ImageMetadata) DeepCopy ¶
func (in *ImageMetadata) DeepCopy() *ImageMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageMetadata.
func (*ImageMetadata) DeepCopyInto ¶
func (in *ImageMetadata) DeepCopyInto(out *ImageMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelMetadata ¶
type ModelMetadata struct {
// CanonicalName is the canonical model identifier (e.g., mistralai/Mixtral-8x22B-Instruct-v0.1).
// Extracted from: org.amd.silogen.model.canonicalName
// +optional
CanonicalName string `json:"canonicalName,omitempty"`
// Source is the URL where the model can be found.
// Extracted from: org.amd.silogen.model.source
// +optional
Source string `json:"source,omitempty"`
// Tags are descriptive tags (e.g., ["text-generation", "chat", "instruction"]).
// Extracted from: org.amd.silogen.model.tags (comma-separated)
// +optional
Tags []string `json:"tags,omitempty"`
// Versions lists available versions.
// Extracted from: org.amd.silogen.model.versions (comma-separated)
// +optional
Versions []string `json:"versions,omitempty"`
// Variants lists model variants.
// Extracted from: org.amd.silogen.model.variants (comma-separated)
// +optional
Variants []string `json:"variants,omitempty"`
// HFTokenRequired indicates if a HuggingFace token is required.
// Extracted from: org.amd.silogen.hfToken.required
// +optional
HFTokenRequired bool `json:"hfTokenRequired,omitempty"`
// Title is the Silogen-specific title for the model.
// Extracted from: org.amd.silogen.title
// +optional
Title string `json:"title,omitempty"`
// DescriptionFull is the full description.
// Extracted from: org.amd.silogen.description.full
// +optional
DescriptionFull string `json:"descriptionFull,omitempty"`
// ReleaseNotes contains release notes for this version.
// Extracted from: org.amd.silogen.release.notes
// +optional
ReleaseNotes string `json:"releaseNotes,omitempty"`
// RecommendedDeployments contains recommended deployment configurations.
// Extracted from: org.amd.silogen.model.recommendedDeployments (parsed from JSON array)
// +optional
RecommendedDeployments []RecommendedDeployment `json:"recommendedDeployments,omitempty"`
}
ModelMetadata contains AMD Silogen model-specific metadata extracted from image labels.
func (*ModelMetadata) DeepCopy ¶
func (in *ModelMetadata) DeepCopy() *ModelMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelMetadata.
func (*ModelMetadata) DeepCopyInto ¶
func (in *ModelMetadata) DeepCopyInto(out *ModelMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ModelSourceFilter ¶
type ModelSourceFilter struct {
// Image pattern with wildcard and full URI support.
//
// Supported formats:
// - Repository pattern: "amdenterpriseai/aim-*"
// - Repository with tag: "silogen/aim-llama:1.0.0" (overrides versions field)
// - Full URI: "ghcr.io/silogen/aim-google-gemma-3-1b-it:0.8.1-rc1" (overrides spec.registry and versions)
// - Full URI with wildcard: "ghcr.io/silogen/aim-*" (overrides spec.registry)
//
// When a full URI is specified (including registry like ghcr.io), only images from that
// registry will match. When a tag is included, it takes precedence over the versions field.
//
// Wildcard: * matches any sequence of characters.
// +kubebuilder:validation:MaxLength=512
Image string `json:"image"`
// Exclude lists specific repository names to skip (exact match on repository name only, not registry).
// Useful for excluding base images or experimental versions.
//
// Examples:
// - ["amdenterpriseai/aim-base", "amdenterpriseai/aim-experimental"]
// - ["silogen/aim-base"] - works with "ghcr.io/silogen/aim-*" (registry is not checked in exclusion)
//
// Note: Exclusions match against repository names (e.g., "silogen/aim-base"), not full URIs.
// +optional
Exclude []string `json:"exclude,omitempty"`
// Versions specifies semantic version constraints for this filter.
// If specified, overrides the global Versions field.
// Only tags that parse as valid semver are considered (including prereleases like 0.8.1-rc1).
// Ignored if the Image field includes an explicit tag (e.g., "repo:1.0.0").
//
// Examples: ">=1.0.0", "<2.0.0", "~1.2.0" (patch updates), "^1.0.0" (minor updates)
//
// Prerelease versions (e.g., 0.8.1-rc1) are supported and follow semver rules:
// - 0.8.1-rc1 matches ">=0.8.0" (prerelease is part of version 0.8.1)
// - Use ">=0.8.1-rc1" to match only that prerelease or higher
// - Leave empty to match all tags (including prereleases and non-semver tags)
// +optional
Versions []string `json:"versions,omitempty"`
}
ModelSourceFilter defines a pattern for discovering images. Supports multiple formats: - Repository patterns: "org/repo*" - matches repositories with wildcards - Repository with tag: "org/repo:1.0.0" - exact tag match - Full URI: "ghcr.io/org/repo:1.0.0" - overrides registry and tag - Full URI with wildcard: "ghcr.io/org/repo*" - overrides registry, matches pattern
func (*ModelSourceFilter) DeepCopy ¶
func (in *ModelSourceFilter) DeepCopy() *ModelSourceFilter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelSourceFilter.
func (*ModelSourceFilter) DeepCopyInto ¶
func (in *ModelSourceFilter) DeepCopyInto(out *ModelSourceFilter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OCIMetadata ¶
type OCIMetadata struct {
// Title is the human-readable title.
// Extracted from: org.opencontainers.image.title
// +optional
Title string `json:"title,omitempty"`
// Description is a brief description.
// Extracted from: org.opencontainers.image.description
// +optional
Description string `json:"description,omitempty"`
// Licenses is the SPDX license identifier(s).
// Extracted from: org.opencontainers.image.licenses
// +optional
Licenses string `json:"licenses,omitempty"`
// Vendor is the organization that produced the image.
// Extracted from: org.opencontainers.image.vendor
// +optional
Vendor string `json:"vendor,omitempty"`
// Authors is contact details of the authors.
// Extracted from: org.opencontainers.image.authors
// +optional
Authors string `json:"authors,omitempty"`
// Source is the URL to the source code repository.
// Extracted from: org.opencontainers.image.source
// +optional
Source string `json:"source,omitempty"`
// Documentation is the URL to documentation.
// Extracted from: org.opencontainers.image.documentation
// +optional
Documentation string `json:"documentation,omitempty"`
// Created is the creation timestamp.
// Extracted from: org.opencontainers.image.created
// +optional
Created string `json:"created,omitempty"`
// Revision is the source control revision.
// Extracted from: org.opencontainers.image.revision
// +optional
Revision string `json:"revision,omitempty"`
// Version is the image version.
// Extracted from: org.opencontainers.image.version
// +optional
Version string `json:"version,omitempty"`
}
OCIMetadata contains standard OCI image metadata extracted from image labels.
func (*OCIMetadata) DeepCopy ¶
func (in *OCIMetadata) DeepCopy() *OCIMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OCIMetadata.
func (*OCIMetadata) DeepCopyInto ¶
func (in *OCIMetadata) DeepCopyInto(out *OCIMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProfileDiscoveryStatusEnum ¶
type ProfileDiscoveryStatusEnum string
ProfileDiscoveryStatusEnum tracks the lifecycle of discovery for a specific deployment profile. A single image may have multiple profiles (e.g., latency-optimized for MI300X, throughput-optimized for MI325X). +kubebuilder:validation:Enum=Pending;Running;Completed;Failed;NotAvailable
const ( // ProfileDiscoveryStatusPending indicates discovery has not started for this profile. ProfileDiscoveryStatusPending ProfileDiscoveryStatusEnum = "Pending" // ProfileDiscoveryStatusRunning indicates discovery is currently in progress for this profile. ProfileDiscoveryStatusRunning ProfileDiscoveryStatusEnum = "Running" // ProfileDiscoveryStatusCompleted indicates discovery completed successfully and profile data is available. ProfileDiscoveryStatusCompleted ProfileDiscoveryStatusEnum = "Completed" // ProfileDiscoveryStatusFailed indicates discovery failed for this profile (e.g., container error, invalid metadata). ProfileDiscoveryStatusFailed ProfileDiscoveryStatusEnum = "Failed" // ProfileDiscoveryStatusNotAvailable indicates the required GPU type for this profile doesn't exist in the cluster. // The profile is valid but cannot be used until appropriate hardware is available. ProfileDiscoveryStatusNotAvailable ProfileDiscoveryStatusEnum = "NotAvailable" )
type RecommendedDeployment ¶
type RecommendedDeployment struct {
// GPUModel is the GPU model name (e.g., MI300X, MI325X)
// +optional
GPUModel string `json:"gpuModel,omitempty"`
// GPUCount is the number of GPUs required
// +optional
GPUCount int32 `json:"gpuCount,omitempty"`
// Precision is the recommended precision (e.g., fp8, fp16, bf16)
// +optional
Precision string `json:"precision,omitempty"`
// Metric is the optimization target (e.g., latency, throughput)
// +optional
Metric string `json:"metric,omitempty"`
// ProfileId is the unique identifier of the AIM profile for this deployment.
// When set, templates created from this deployment will use this profile ID
// to deterministically select the correct runtime profile in the AIM container.
// +optional
ProfileId string `json:"profileId,omitempty"`
// Description provides additional context about this deployment configuration
// +optional
Description string `json:"description,omitempty"`
}
RecommendedDeployment describes a recommended deployment configuration for a model.
func (*RecommendedDeployment) DeepCopy ¶
func (in *RecommendedDeployment) DeepCopy() *RecommendedDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendedDeployment.
func (*RecommendedDeployment) DeepCopyInto ¶
func (in *RecommendedDeployment) DeepCopyInto(out *RecommendedDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuntimeConfigRef ¶
type RuntimeConfigRef struct {
// Name is the name of the runtime config to use for this resource. If a runtime config with this name exists both
// as a namespace and a cluster runtime config, the values are merged together, the namespace config taking priority
// over the cluster config when there are conflicts. If this field is empty or set to `default`, the namespace / cluster
// runtime config with the name `default` is used, if it exists.
// +optional
Name string `json:"runtimeConfigName,omitempty"`
}
func (*RuntimeConfigRef) DeepCopy ¶
func (in *RuntimeConfigRef) DeepCopy() *RuntimeConfigRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeConfigRef.
func (*RuntimeConfigRef) DeepCopyInto ¶
func (in *RuntimeConfigRef) DeepCopyInto(out *RuntimeConfigRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files
¶
- aimartifact_types.go
- aimclustermodel_types.go
- aimclustermodelsource_types.go
- aimclusterruntimeconfig_types.go
- aimclusterservicetemplate_types.go
- aimmodel_shared.go
- aimmodel_types.go
- aimruntimeconfig_shared.go
- aimruntimeconfig_types.go
- aimservice_types.go
- aimservicetemplate_shared.go
- aimservicetemplate_types.go
- aimtemplatecache_types.go
- autoscaling_types.go
- common_types.go
- discovery.go
- groupversion_info.go
- registry.go
- runtime.go
- zz_generated.deepcopy.go