@@ -21,6 +21,7 @@ import (
2121 "fmt"
2222 "maps"
2323 "reflect"
24+ "strings"
2425
2526 appsv1 "k8s.io/api/apps/v1"
2627 corev1 "k8s.io/api/core/v1"
@@ -1066,6 +1067,11 @@ func (r *VLLMRuntimeReconciler) updateStatus(
10661067 latestVR .Status .Replicas = dep .Status .Replicas
10671068 latestVR .Status .Selector = metav1 .FormatLabelSelector (dep .Spec .Selector )
10681069
1070+ // Expose additional deployment status fields
1071+ latestVR .Status .AvailableReplicas = dep .Status .AvailableReplicas
1072+ latestVR .Status .UpdatedReplicas = dep .Status .UpdatedReplicas
1073+ latestVR .Status .UnavailableReplicas = dep .Status .UnavailableReplicas
1074+
10691075 return r .Status ().Update (ctx , latestVR )
10701076 })
10711077}
@@ -1089,6 +1095,13 @@ func (r *VLLMRuntimeReconciler) reconcileScaledObject(
10891095
10901096 prometheusAddr := cfg .Triggers .PrometheusAddress
10911097 servedModelName := vllmRuntime .Spec .Model .ModelURL
1098+ // Check extraArgs for --served-model-name override
1099+ for _ , arg := range vllmRuntime .Spec .VLLMConfig .ExtraArgs {
1100+ if strings .HasPrefix (arg , "--served-model-name=" ) {
1101+ servedModelName = strings .TrimPrefix (arg , "--served-model-name=" )
1102+ break
1103+ }
1104+ }
10921105
10931106 spec := map [string ]interface {}{
10941107 "scaleTargetRef" : map [string ]interface {}{
@@ -1125,7 +1138,7 @@ func (r *VLLMRuntimeReconciler) reconcileScaledObject(
11251138 "metadata" : map [string ]string {
11261139 "serverAddress" : prometheusAddr ,
11271140 "metricName" : "vllm_incoming_keepalive" ,
1128- "query" : fmt .Sprintf (`sum(rate(vllm:num_incoming_requests_total{namespace="%s", model="%s"}[1m ]) > bool 0)` , vllmRuntime .Namespace , servedModelName ),
1141+ "query" : fmt .Sprintf (`sum(rate(vllm:num_incoming_requests_total{namespace="%s", model="%s"}[2m ]) > bool 0)` , vllmRuntime .Namespace , servedModelName ),
11291142 "threshold" : "1" ,
11301143 },
11311144 },
0 commit comments