Skip to content

Commit 7cf654e

Browse files
authored
with kserve 0.15 bump, updated multi node checker with WorkerSpec (opendatahub-io#478)
Signed-off-by: Jooho Lee <jlee@redhat.com>
1 parent c7a792c commit 7cf654e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

internal/controller/serving/servingruntime_controller.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

399399
func 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

Comments
 (0)