@@ -323,7 +323,7 @@ func (r *ServingRuntimeReconciler) reconcileDefaultRayServerCertSecretInUserNS(c
323323 return err
324324 }
325325 for _ , sr := range servingRuntimeList .Items {
326- if isMultiNodeServingRuntime (sr . Name ) {
326+ if isMultiNodeServingRuntime (sr ) {
327327 rayDefaultSecret .SetNamespace (sr .Namespace )
328328 if err := r .Client .Update (ctx , rayDefaultSecret ); err != nil {
329329 if apierrs .IsNotFound (err ) {
@@ -397,18 +397,17 @@ func getDesiredRayDefaultSecret(namespace string, caSecret *corev1.Secret) *core
397397}
398398
399399func existMultiNodeServingRuntimeInNs (srList servingv1alpha1.ServingRuntimeList ) bool {
400- existMultiNodeServingRuntime := false
401400 for _ , sr := range srList .Items {
402- existMultiNodeServingRuntime = isMultiNodeServingRuntime (sr .Name )
401+ if isMultiNodeServingRuntime (sr ) {
402+ return true
403+ }
403404 }
404- return existMultiNodeServingRuntime
405+ return false
405406}
406407
407408// Determine if ServingRuntime matches specific conditions
408- // TO-DO upstream Kserve 0.15 will have a new API WorkerSpec
409- // So for now, it will check servingRuntime name, but after we move to 0.15, it needs to check workerSpec is specified or not.(RHOAIENG-16147)
410- func isMultiNodeServingRuntime (srName string ) bool {
411- return srName == "vllm-multinode-runtime"
409+ func isMultiNodeServingRuntime (sr servingv1alpha1.ServingRuntime ) bool {
410+ return sr .Spec .WorkerSpec != nil
412411}
413412
414413// SetupWithManager sets up the controller with the Manager.
0 commit comments