Don't start the Gateway Shared Informer Factory if the Gateway API feature is disabled

Signed-off-by: Jake Sanders <i@am.so-aweso.me>
This commit is contained in:
Jake Sanders
2021-08-05 15:22:02 +01:00
parent d4c8aea472
commit ed4ad50b22
+4 -1
View File
@@ -194,7 +194,10 @@ func Run(opts *options.ControllerOptions, stopCh <-chan struct{}) error {
log.V(logf.DebugLevel).Info("starting shared informer factories")
ctx.SharedInformerFactory.Start(rootCtx.Done())
ctx.KubeSharedInformerFactory.Start(rootCtx.Done())
ctx.GWShared.Start(rootCtx.Done())
if utilfeature.DefaultFeatureGate.Enabled(feature.ExperimentalGatewayAPISupport) {
ctx.GWShared.Start(rootCtx.Done())
}
err = g.Wait()
if err != nil {