@@ -228,11 +228,6 @@ var _ = Describe("Component sync controller", func() {
228
228
var operands []client.Object
229
229
var watcher mockedWatcher
230
230
231
- externalFeatureGateAccessor := featuregates .NewHardcodedFeatureGateAccess (
232
- []configv1.FeatureGateName {configv1 .FeatureGateExternalCloudProvider },
233
- nil ,
234
- )
235
-
236
231
kcmStatus := & operatorv1.KubeControllerManagerStatus {
237
232
StaticPodOperatorStatus : operatorv1.StaticPodOperatorStatus {
238
233
OperatorStatus : operatorv1.OperatorStatus {
@@ -363,7 +358,6 @@ var _ = Describe("Component sync controller", func() {
363
358
364
359
type testCase struct {
365
360
status * configv1.InfrastructureStatus
366
- featureGate featuregates.FeatureGateAccess
367
361
kcmStatus * operatorv1.KubeControllerManagerStatus
368
362
coStatus * configv1.ClusterOperatorStatus
369
363
expectProvisioned bool
@@ -376,9 +370,7 @@ var _ = Describe("Component sync controller", func() {
376
370
infra .Status = * tc .status
377
371
Expect (cl .Status ().Update (context .Background (), infra .DeepCopy ())).To (Succeed ())
378
372
379
- if tc .featureGate != nil {
380
- operatorController .FeatureGateAccess = tc .featureGate
381
- }
373
+ operatorController .FeatureGateAccess = featuregates .NewHardcodedFeatureGateAccess (nil , nil )
382
374
383
375
if tc .kcmStatus != nil {
384
376
Expect (cl .Get (context .Background (), client .ObjectKeyFromObject (kcm ), kcm )).To (Succeed ())
@@ -400,7 +392,7 @@ var _ = Describe("Component sync controller", func() {
400
392
401
393
watchMap := watcher .getWatchedResources ()
402
394
403
- operatorConfig := getOperatorConfigForPlatform (tc .status .PlatformStatus , tc . featureGate )
395
+ operatorConfig := getOperatorConfigForPlatform (tc .status .PlatformStatus , operatorController . FeatureGateAccess )
404
396
405
397
clusterOperator , err := operatorController .getOrCreateClusterOperator (context .Background ())
406
398
Expect (err ).To (Succeed ())
@@ -452,7 +444,6 @@ var _ = Describe("Component sync controller", func() {
452
444
Type : configv1 .AWSPlatformType ,
453
445
},
454
446
},
455
- featureGate : externalFeatureGateAccessor ,
456
447
kcmStatus : kcmStatus ,
457
448
coStatus : coStatus ,
458
449
expectProvisioned : true ,
@@ -466,7 +457,6 @@ var _ = Describe("Component sync controller", func() {
466
457
Type : configv1 .OpenStackPlatformType ,
467
458
},
468
459
},
469
- featureGate : externalFeatureGateAccessor ,
470
460
kcmStatus : kcmStatus ,
471
461
coStatus : coStatus ,
472
462
expectProvisioned : true ,
@@ -480,7 +470,6 @@ var _ = Describe("Component sync controller", func() {
480
470
Type : configv1 .AWSPlatformType ,
481
471
},
482
472
},
483
- featureGate : externalFeatureGateAccessor ,
484
473
kcmStatus : & operatorv1.KubeControllerManagerStatus {},
485
474
coStatus : coStatus ,
486
475
expectProvisioned : true ,
@@ -494,24 +483,10 @@ var _ = Describe("Component sync controller", func() {
494
483
Type : configv1 .KubevirtPlatformType ,
495
484
},
496
485
},
497
- featureGate : externalFeatureGateAccessor ,
498
486
kcmStatus : kcmStatus ,
499
487
coStatus : coStatus ,
500
488
expectProvisioned : false ,
501
489
}),
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
- }),
515
490
Entry ("Should not provision resources for OpenStack if external FeatureGate is not present" , testCase {
516
491
status : & configv1.InfrastructureStatus {
517
492
InfrastructureTopology : configv1 .HighlyAvailableTopologyMode ,
@@ -532,7 +507,6 @@ var _ = Describe("Component sync controller", func() {
532
507
Type : configv1 .AWSPlatformType ,
533
508
},
534
509
},
535
- featureGate : externalFeatureGateAccessor ,
536
510
kcmStatus : & operatorv1.KubeControllerManagerStatus {
537
511
StaticPodOperatorStatus : operatorv1.StaticPodOperatorStatus {
538
512
OperatorStatus : operatorv1.OperatorStatus {
@@ -558,7 +532,6 @@ var _ = Describe("Component sync controller", func() {
558
532
Type : configv1 .AWSPlatformType ,
559
533
},
560
534
},
561
- featureGate : externalFeatureGateAccessor ,
562
535
kcmStatus : & operatorv1.KubeControllerManagerStatus {
563
536
StaticPodOperatorStatus : operatorv1.StaticPodOperatorStatus {
564
537
OperatorStatus : operatorv1.OperatorStatus {
@@ -584,8 +557,7 @@ var _ = Describe("Component sync controller", func() {
584
557
Type : configv1 .AWSPlatformType ,
585
558
},
586
559
},
587
- featureGate : externalFeatureGateAccessor ,
588
- kcmStatus : kcmStatus ,
560
+ kcmStatus : kcmStatus ,
589
561
coStatus : & configv1.ClusterOperatorStatus {
590
562
Conditions : []configv1.ClusterOperatorStatusCondition {
591
563
{
@@ -622,8 +594,7 @@ var _ = Describe("Component sync controller", func() {
622
594
Type : configv1 .AWSPlatformType ,
623
595
},
624
596
},
625
- featureGate : externalFeatureGateAccessor ,
626
- kcmStatus : kcmStatus ,
597
+ kcmStatus : kcmStatus ,
627
598
coStatus : & configv1.ClusterOperatorStatus {
628
599
Conditions : []configv1.ClusterOperatorStatusCondition {
629
600
{
0 commit comments