Skip to content

Commit 0da7c51

Browse files
committed
Updates due to new and moved APIs
Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
1 parent ce1dea2 commit 0da7c51

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

cmd/epp/runner/runner.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
conformance_epp "sigs.k8s.io/gateway-api-inference-extension/conformance/testing-epp"
3939
"sigs.k8s.io/gateway-api-inference-extension/internal/runnable"
4040
backendmetrics "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/backend/metrics"
41-
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/common/config"
41+
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/common/config/loader"
4242
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/datastore"
4343
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/metrics"
4444
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/metrics/collectors"
@@ -216,29 +216,28 @@ func (r *Runner) Run(ctx context.Context) error {
216216
}
217217

218218
if len(*configText) != 0 || len(*configFile) != 0 {
219-
theConfig, err := config.LoadConfig([]byte(*configText), *configFile)
219+
theConfig, err := loader.LoadConfig([]byte(*configText), *configFile)
220220
if err != nil {
221221
setupLog.Error(err, "Failed to load the configuration")
222222
return err
223223
}
224224

225-
epp := eppHandle{}
226-
instantiatedPlugins, err := config.LoadPluginReferences(theConfig.Plugins, epp)
225+
epp := newEppHandle()
226+
227+
err = loader.LoadPluginReferences(theConfig.Plugins, epp)
227228
if err != nil {
228229
setupLog.Error(err, "Failed to instantiate the plugins")
229230
return err
230231
}
231232

232-
r.schedulerConfig, err = scheduling.LoadSchedulerConfig(theConfig.SchedulingProfiles, instantiatedPlugins)
233+
r.schedulerConfig, err = loader.LoadSchedulerConfig(theConfig.SchedulingProfiles, epp)
233234
if err != nil {
234235
setupLog.Error(err, "Failed to create Scheduler configuration")
235236
return err
236237
}
237238

238-
// Add requestcontrol plugins
239-
if instantiatedPlugins != nil {
240-
r.requestControlConfig = requestcontrol.LoadRequestControlConfig(instantiatedPlugins)
241-
}
239+
// Add requestControl plugins
240+
r.requestControlConfig.AddPlugins(epp.Plugins().GetAllPlugins()...)
242241
}
243242

244243
// --- Initialize Core EPP Components ---

0 commit comments

Comments
 (0)