Skip to content

Commit 98e766d

Browse files
committed
Added registration of FeatureGates
Signed-off-by: Shmuel Kallner <[email protected]>
1 parent f8afdea commit 98e766d

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

cmd/epp/runner/runner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ func (r *Runner) parseConfiguration(ctx context.Context) (*config.Config, error)
317317
}
318318
}
319319

320+
loader.RegisterFeatureGate(datalayer.FeatureGate)
321+
320322
r.registerInTreePlugins()
321323
handle := plugins.NewEppHandle(ctx)
322324
cfg, err := loader.LoadConfig(configBytes, handle, logger)

pkg/epp/config/loader/configloader.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ import (
3636

3737
var scheme = runtime.NewScheme()
3838

39+
var registeredFeatureGates = map[string]struct{}{}
40+
3941
func init() {
4042
utilruntime.Must(configapi.Install(scheme))
4143
}
@@ -207,3 +209,9 @@ func validateSchedulingProfiles(config *configapi.EndpointPickerConfig) error {
207209
}
208210
return nil
209211
}
212+
213+
// RegisterFeatureGate registers feature gate keys for validation
214+
func RegisterFeatureGate(gate string) {
215+
registeredFeatureGates[gate] = struct{}{}
216+
}
217+

pkg/epp/datalayer/factory.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ import (
2828
v1 "sigs.k8s.io/gateway-api-inference-extension/api/v1"
2929
)
3030

31+
const (
32+
FeatureGate = "dataLayer"
33+
)
34+
3135
// PoolInfo represents the DataStore information needed for endpoints.
3236
// TODO:
3337
// Consider if to remove/simplify in follow-ups. This is mostly for backward

0 commit comments

Comments
 (0)