Skip to content

Commit f445ba5

Browse files
committed
fix-multiple-scheduling-profiles
1 parent a879412 commit f445ba5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/epp/config/loader/configloader.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/plugins"
3232
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/scheduling"
3333
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/scheduling/framework"
34+
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/scheduling/framework/plugins/profile"
3435
)
3536

3637
var scheme = runtime.NewScheme()
@@ -113,6 +114,10 @@ func loadSchedulerConfig(configProfiles []configapi.SchedulingProfile, handle pl
113114
return nil, errors.New("no profile handler was specified")
114115
}
115116

117+
if profileHandler.TypedName().Type == profile.SingleProfileHandlerType && len(profiles) > 0 {
118+
return nil, errors.New("single profile handler is intended to be used with a single profile, but multiple profiles were specified")
119+
}
120+
116121
return scheduling.NewSchedulerConfig(profileHandler, profiles), nil
117122
}
118123

0 commit comments

Comments
 (0)