@@ -346,9 +346,9 @@ func CreateOperatorStarter(ctx context.Context, authOperatorInput *authenticatio
346346 return ret , nil
347347}
348348
349- type featureGateAccessorFunc func (ctx context.Context , authOperatorInput * authenticationOperatorInput , informerFactories authenticationOperatorInformerFactories ) (featuregates.FeatureGate , error )
349+ type featureGateAccessorFunc func (ctx context.Context , authOperatorInput * authenticationOperatorInput , informerFactories authenticationOperatorInformerFactories ) (featuregates.FeatureGateAccess , error )
350350
351- func defaultFeatureGateAccessor (ctx context.Context , authOperatorInput * authenticationOperatorInput , informerFactories authenticationOperatorInformerFactories ) (featuregates.FeatureGate , error ) {
351+ func defaultFeatureGateAccessor (ctx context.Context , authOperatorInput * authenticationOperatorInput , informerFactories authenticationOperatorInformerFactories ) (featuregates.FeatureGateAccess , error ) {
352352 // By default, this will exit(0) if the featuregates change
353353 featureGateAccessor := featuregates .NewFeatureGateAccess (
354354 status .VersionForOperatorFromEnv (), "0.0.1-snapshot" ,
@@ -359,19 +359,12 @@ func defaultFeatureGateAccessor(ctx context.Context, authOperatorInput *authenti
359359 go featureGateAccessor .Run (ctx )
360360 go informerFactories .operatorConfigInformer .Start (ctx .Done ())
361361
362- var featureGates featuregates.FeatureGate
363- select {
364- case <- featureGateAccessor .InitialFeatureGatesObserved ():
365- featureGates , _ = featureGateAccessor .CurrentFeatureGates ()
366- case <- time .After (1 * time .Minute ):
367- return nil , fmt .Errorf ("timed out waiting for FeatureGate detection" )
368- }
369- return featureGates , nil
362+ return featureGateAccessor , nil
370363}
371364
372365// staticFeatureGateAccessor is primarly used during testing to statically enable or disable features.
373366func staticFeatureGateAccessor (enabled , disabled []ocpconfigv1.FeatureGateName ) featureGateAccessorFunc {
374- return func (_ context.Context , _ * authenticationOperatorInput , _ authenticationOperatorInformerFactories ) (featuregates.FeatureGate , error ) {
375- return featuregates .NewFeatureGate (enabled , disabled ), nil
367+ return func (_ context.Context , _ * authenticationOperatorInput , _ authenticationOperatorInformerFactories ) (featuregates.FeatureGateAccess , error ) {
368+ return featuregates .NewHardcodedFeatureGateAccess (enabled , disabled ), nil
376369 }
377370}
0 commit comments