Documentation
¶
Index ¶
- func GetEffectiveType(specDefault *aimv1alpha1.AIMProfileType, ...) aimv1alpha1.AIMProfileType
- func IsCustomModel(spec *aimv1alpha1.AIMModelSpec) bool
- func MergeHardware(specDefault, templateOverride *aimv1alpha1.AIMHardwareRequirements) *aimv1alpha1.AIMHardwareRequirements
- type ClusterModelFetchResult
- type ClusterModelObservation
- type ClusterModelReconciler
- func (r *ClusterModelReconciler) ComposeState(_ context.Context, ...) ClusterModelObservation
- func (r *ClusterModelReconciler) DecorateStatus(status *aimv1alpha1.AIMModelStatus, cm *controllerutils.ConditionManager, ...)
- func (r *ClusterModelReconciler) FetchRemoteState(ctx context.Context, c client.Client, ...) ClusterModelFetchResult
- func (r *ClusterModelReconciler) PlanResources(ctx context.Context, ...) controllerutils.PlanResult
- type ModelFetchResult
- type ModelObservation
- type ModelReconciler
- func (r *ModelReconciler) ComposeState(_ context.Context, _ controllerutils.ReconcileContext[*aimv1alpha1.AIMModel], ...) ModelObservation
- func (r *ModelReconciler) DecorateStatus(status *aimv1alpha1.AIMModelStatus, cm *controllerutils.ConditionManager, ...)
- func (r *ModelReconciler) FetchRemoteState(ctx context.Context, c client.Client, ...) ModelFetchResult
- func (r *ModelReconciler) PlanResources(ctx context.Context, _ controllerutils.ReconcileContext[*aimv1alpha1.AIMModel], ...) controllerutils.PlanResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEffectiveType ¶
func GetEffectiveType(specDefault *aimv1alpha1.AIMProfileType, templateType aimv1alpha1.AIMProfileType) aimv1alpha1.AIMProfileType
GetEffectiveType returns the effective profile type for a custom template. Uses template-level type if set, otherwise falls back to spec-level default, otherwise defaults to "unoptimized".
func IsCustomModel ¶
func IsCustomModel(spec *aimv1alpha1.AIMModelSpec) bool
IsCustomModel returns true if the model spec defines inline model sources, indicating it's a custom model rather than an image-based model.
func MergeHardware ¶
func MergeHardware(specDefault, templateOverride *aimv1alpha1.AIMHardwareRequirements) *aimv1alpha1.AIMHardwareRequirements
MergeHardware merges spec-level default hardware with template-level overrides. Template values take precedence over spec defaults. When template provides a GPU struct, all its values (including zero) override spec. When template only provides CPU, spec GPU is preserved.
Types ¶
type ClusterModelFetchResult ¶
type ClusterModelFetchResult struct {
// contains filtered or unexported fields
}
func (ClusterModelFetchResult) GetComponentHealth ¶
func (result ClusterModelFetchResult) GetComponentHealth() []controllerutils.ComponentHealth
type ClusterModelObservation ¶
type ClusterModelObservation struct {
ClusterModelFetchResult
}
ClusterModelObservation embeds the fetch result. The observation phase is minimal since FetchResult.GetComponentHealth() handles health derivation and PlanResources uses spec helper methods directly for planning decisions.
type ClusterModelReconciler ¶
type ClusterModelReconciler struct {
Clientset kubernetes.Interface
Scheme *runtime.Scheme
}
func (*ClusterModelReconciler) ComposeState ¶
func (r *ClusterModelReconciler) ComposeState( _ context.Context, _ controllerutils.ReconcileContext[*aimv1alpha1.AIMClusterModel], fetch ClusterModelFetchResult, ) ClusterModelObservation
func (*ClusterModelReconciler) DecorateStatus ¶
func (r *ClusterModelReconciler) DecorateStatus( status *aimv1alpha1.AIMModelStatus, cm *controllerutils.ConditionManager, obs ClusterModelObservation, )
func (*ClusterModelReconciler) FetchRemoteState ¶
func (r *ClusterModelReconciler) FetchRemoteState( ctx context.Context, c client.Client, reconcileCtx controllerutils.ReconcileContext[*aimv1alpha1.AIMClusterModel], ) ClusterModelFetchResult
func (*ClusterModelReconciler) PlanResources ¶
func (r *ClusterModelReconciler) PlanResources( ctx context.Context, _ controllerutils.ReconcileContext[*aimv1alpha1.AIMClusterModel], obs ClusterModelObservation, ) controllerutils.PlanResult
type ModelFetchResult ¶
type ModelFetchResult struct {
// contains filtered or unexported fields
}
func (ModelFetchResult) GetComponentHealth ¶
func (result ModelFetchResult) GetComponentHealth() []controllerutils.ComponentHealth
type ModelObservation ¶
type ModelObservation struct {
ModelFetchResult
}
ModelObservation embeds the fetch result. The observation phase is minimal since FetchResult.GetComponentHealth() handles health derivation and PlanResources uses spec helper methods directly for planning decisions.
type ModelReconciler ¶
type ModelReconciler struct {
Clientset kubernetes.Interface
Scheme *runtime.Scheme
}
func (*ModelReconciler) ComposeState ¶
func (r *ModelReconciler) ComposeState( _ context.Context, _ controllerutils.ReconcileContext[*aimv1alpha1.AIMModel], fetch ModelFetchResult, ) ModelObservation
func (*ModelReconciler) DecorateStatus ¶
func (r *ModelReconciler) DecorateStatus( status *aimv1alpha1.AIMModelStatus, cm *controllerutils.ConditionManager, obs ModelObservation, )
func (*ModelReconciler) FetchRemoteState ¶
func (r *ModelReconciler) FetchRemoteState( ctx context.Context, c client.Client, reconcileCtx controllerutils.ReconcileContext[*aimv1alpha1.AIMModel], ) ModelFetchResult
func (*ModelReconciler) PlanResources ¶
func (r *ModelReconciler) PlanResources( ctx context.Context, _ controllerutils.ReconcileContext[*aimv1alpha1.AIMModel], obs ModelObservation, ) controllerutils.PlanResult