Skip to content

Commit 2c7ada7

Browse files
committed
runner: update entrypoint to use new config loader
Updates the EPP runner to use the refactored loader functions. The flow is updated to: 1. `loader.LoadRawConfig` to parse bytes and retrieve feature gates. 2. Initialize the plugin handle. 3. `loader.InstantiateAndConfigure` to build the final configuration.
1 parent 446318b commit 2c7ada7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/epp/runner/runner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ func (r *Runner) parseConfigurationPhaseOne(ctx context.Context) (*configapi.End
468468

469469
r.registerInTreePlugins()
470470

471-
rawConfig, featureGates, err := loader.LoadConfigPhaseOne(configBytes, logger)
471+
rawConfig, featureGates, err := loader.LoadRawConfig(configBytes, logger)
472472
if err != nil {
473473
return nil, fmt.Errorf("failed to parse config - %w", err)
474474
}
@@ -494,7 +494,7 @@ func makePodListFunc(ds datastore.Datastore) func() []types.NamespacedName {
494494
func (r *Runner) parseConfigurationPhaseTwo(ctx context.Context, rawConfig *configapi.EndpointPickerConfig, ds datastore.Datastore) (*config.Config, error) {
495495
logger := log.FromContext(ctx)
496496
handle := plugins.NewEppHandle(ctx, makePodListFunc(ds))
497-
cfg, err := loader.LoadConfigPhaseTwo(rawConfig, handle, logger)
497+
cfg, err := loader.InstantiateAndConfigure(rawConfig, handle, logger)
498498

499499
if err != nil {
500500
return nil, fmt.Errorf("failed to load the configuration - %w", err)

0 commit comments

Comments
 (0)