@@ -228,11 +228,6 @@ var _ = Describe("Component sync controller", func() {
228228 var operands []client.Object
229229 var watcher mockedWatcher
230230
231- externalFeatureGateAccessor := featuregates .NewHardcodedFeatureGateAccess (
232- []configv1.FeatureGateName {configv1 .FeatureGateExternalCloudProvider },
233- nil ,
234- )
235-
236231 kcmStatus := & operatorv1.KubeControllerManagerStatus {
237232 StaticPodOperatorStatus : operatorv1.StaticPodOperatorStatus {
238233 OperatorStatus : operatorv1.OperatorStatus {
@@ -363,7 +358,6 @@ var _ = Describe("Component sync controller", func() {
363358
364359 type testCase struct {
365360 status * configv1.InfrastructureStatus
366- featureGate featuregates.FeatureGateAccess
367361 kcmStatus * operatorv1.KubeControllerManagerStatus
368362 coStatus * configv1.ClusterOperatorStatus
369363 expectProvisioned bool
@@ -376,9 +370,7 @@ var _ = Describe("Component sync controller", func() {
376370 infra .Status = * tc .status
377371 Expect (cl .Status ().Update (context .Background (), infra .DeepCopy ())).To (Succeed ())
378372
379- if tc .featureGate != nil {
380- operatorController .FeatureGateAccess = tc .featureGate
381- }
373+ operatorController .FeatureGateAccess = featuregates .NewHardcodedFeatureGateAccess (nil , nil )
382374
383375 if tc .kcmStatus != nil {
384376 Expect (cl .Get (context .Background (), client .ObjectKeyFromObject (kcm ), kcm )).To (Succeed ())
@@ -400,7 +392,7 @@ var _ = Describe("Component sync controller", func() {
400392
401393 watchMap := watcher .getWatchedResources ()
402394
403- operatorConfig := getOperatorConfigForPlatform (tc .status .PlatformStatus , tc . featureGate )
395+ operatorConfig := getOperatorConfigForPlatform (tc .status .PlatformStatus , operatorController . FeatureGateAccess )
404396
405397 clusterOperator , err := operatorController .getOrCreateClusterOperator (context .Background ())
406398 Expect (err ).To (Succeed ())
@@ -452,7 +444,6 @@ var _ = Describe("Component sync controller", func() {
452444 Type : configv1 .AWSPlatformType ,
453445 },
454446 },
455- featureGate : externalFeatureGateAccessor ,
456447 kcmStatus : kcmStatus ,
457448 coStatus : coStatus ,
458449 expectProvisioned : true ,
@@ -466,7 +457,6 @@ var _ = Describe("Component sync controller", func() {
466457 Type : configv1 .OpenStackPlatformType ,
467458 },
468459 },
469- featureGate : externalFeatureGateAccessor ,
470460 kcmStatus : kcmStatus ,
471461 coStatus : coStatus ,
472462 expectProvisioned : true ,
@@ -480,7 +470,6 @@ var _ = Describe("Component sync controller", func() {
480470 Type : configv1 .AWSPlatformType ,
481471 },
482472 },
483- featureGate : externalFeatureGateAccessor ,
484473 kcmStatus : & operatorv1.KubeControllerManagerStatus {},
485474 coStatus : coStatus ,
486475 expectProvisioned : true ,
@@ -494,24 +483,10 @@ var _ = Describe("Component sync controller", func() {
494483 Type : configv1 .KubevirtPlatformType ,
495484 },
496485 },
497- featureGate : externalFeatureGateAccessor ,
498486 kcmStatus : kcmStatus ,
499487 coStatus : coStatus ,
500488 expectProvisioned : false ,
501489 }),
502- Entry ("Should provision resources for AWS if external FeatureGate is not present" , testCase {
503- status : & configv1.InfrastructureStatus {
504- InfrastructureTopology : configv1 .HighlyAvailableTopologyMode ,
505- ControlPlaneTopology : configv1 .HighlyAvailableTopologyMode ,
506- Platform : configv1 .AWSPlatformType ,
507- PlatformStatus : & configv1.PlatformStatus {
508- Type : configv1 .AWSPlatformType ,
509- },
510- },
511- kcmStatus : kcmStatus ,
512- coStatus : coStatus ,
513- expectProvisioned : true ,
514- }),
515490 Entry ("Should not provision resources for OpenStack if external FeatureGate is not present" , testCase {
516491 status : & configv1.InfrastructureStatus {
517492 InfrastructureTopology : configv1 .HighlyAvailableTopologyMode ,
@@ -532,7 +507,6 @@ var _ = Describe("Component sync controller", func() {
532507 Type : configv1 .AWSPlatformType ,
533508 },
534509 },
535- featureGate : externalFeatureGateAccessor ,
536510 kcmStatus : & operatorv1.KubeControllerManagerStatus {
537511 StaticPodOperatorStatus : operatorv1.StaticPodOperatorStatus {
538512 OperatorStatus : operatorv1.OperatorStatus {
@@ -558,7 +532,6 @@ var _ = Describe("Component sync controller", func() {
558532 Type : configv1 .AWSPlatformType ,
559533 },
560534 },
561- featureGate : externalFeatureGateAccessor ,
562535 kcmStatus : & operatorv1.KubeControllerManagerStatus {
563536 StaticPodOperatorStatus : operatorv1.StaticPodOperatorStatus {
564537 OperatorStatus : operatorv1.OperatorStatus {
@@ -584,8 +557,7 @@ var _ = Describe("Component sync controller", func() {
584557 Type : configv1 .AWSPlatformType ,
585558 },
586559 },
587- featureGate : externalFeatureGateAccessor ,
588- kcmStatus : kcmStatus ,
560+ kcmStatus : kcmStatus ,
589561 coStatus : & configv1.ClusterOperatorStatus {
590562 Conditions : []configv1.ClusterOperatorStatusCondition {
591563 {
@@ -622,8 +594,7 @@ var _ = Describe("Component sync controller", func() {
622594 Type : configv1 .AWSPlatformType ,
623595 },
624596 },
625- featureGate : externalFeatureGateAccessor ,
626- kcmStatus : kcmStatus ,
597+ kcmStatus : kcmStatus ,
627598 coStatus : & configv1.ClusterOperatorStatus {
628599 Conditions : []configv1.ClusterOperatorStatusCondition {
629600 {
0 commit comments