@@ -131,7 +131,7 @@ func (r *ServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
131131 }
132132
133133 // Create a service for the leader pods of the lws for loadbalancing.
134- if err := CreateServiceIfNotExists (ctx , r .Client , r .Scheme , service ); err != nil {
134+ if err := CreateServiceIfNotExists (ctx , r .Client , r .Scheme , service , models ); err != nil {
135135 return ctrl.Result {}, err
136136 }
137137
@@ -419,7 +419,7 @@ func setControllerReferenceForWorkload(owner metav1.Object, lws *applyconfigurat
419419 return nil
420420}
421421
422- func CreateServiceIfNotExists (ctx context.Context , k8sClient client.Client , Scheme * runtime.Scheme , service * inferenceapi.Service ) error {
422+ func CreateServiceIfNotExists (ctx context.Context , k8sClient client.Client , Scheme * runtime.Scheme , service * inferenceapi.Service , model [] * coreapi. OpenModel ) error {
423423 log := ctrl .LoggerFrom (ctx )
424424 // The load balancing service name.
425425 svcName := service .Name + "-lb"
@@ -433,6 +433,7 @@ func CreateServiceIfNotExists(ctx context.Context, k8sClient client.Client, Sche
433433 ObjectMeta : metav1.ObjectMeta {
434434 Name : svcName ,
435435 Namespace : service .Namespace ,
436+ Labels : modelLabels (model [0 ]),
436437 },
437438 Spec : corev1.ServiceSpec {
438439 Ports : []corev1.ServicePort {
0 commit comments