@@ -5,6 +5,17 @@ import (
55 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
66)
77
8+ // VariantAutoscalingConfigSpec holds the optional tuning fields for a VariantAutoscaling.
9+ // It is extracted as a standalone embeddable type so that higher-level controllers
10+ // (e.g. KServe) can inline it without duplicating field definitions.
11+ type VariantAutoscalingConfigSpec struct {
12+ // VariantCost specifies the cost per replica for this variant (used in saturation analysis).
13+ // +kubebuilder:validation:Optional
14+ // +kubebuilder:validation:Pattern=`^\d+(\.\d+)?$`
15+ // +kubebuilder:default="10.0"
16+ VariantCost string `json:"variantCost,omitempty"`
17+ }
18+
819// VariantAutoscalingSpec defines the desired state for autoscaling a model variant.
920type VariantAutoscalingSpec struct {
1021 // ScaleTargetRef references the scalable resource to manage.
@@ -17,11 +28,8 @@ type VariantAutoscalingSpec struct {
1728 // +kubebuilder:validation:Required
1829 ModelID string `json:"modelID"`
1930
20- // VariantCost specifies the cost per replica for this variant (used in saturation analysis).
21- // +kubebuilder:validation:Optional
22- // +kubebuilder:validation:Pattern=`^\d+(\.\d+)?$`
23- // +kubebuilder:default="10.0"
24- VariantCost string `json:"variantCost,omitempty"`
31+ // VariantAutoscalingConfigSpec holds optional tuning fields that integrators can embed.
32+ VariantAutoscalingConfigSpec `json:",inline"`
2533}
2634
2735// VariantAutoscalingStatus represents the current status of autoscaling for a variant,
0 commit comments