Skip to content

Commit d93b1d7

Browse files
committed
Remove reliance on feature gates from CCMO for external cloud provider decision
1 parent bcc142e commit d93b1d7

File tree

3 files changed

+11
-38
lines changed

3 files changed

+11
-38
lines changed

docs/dev/hacking-guide.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -130,33 +130,9 @@ OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=quay.io/<your-repo>/release:<your-branc
130130

131131
However, in order for the cluster to run the CCM from the start, you need to add an additional step to the installation.
132132

133-
By specifying the `CustomNoUpgrade` feature gate in the cluster with `ExternalCloudProvider` you are enabling CCCMO logic for providers, which are currently in Technical Preview state.
134-
135133
```bash
136134
export OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=quay.io/<your-repo>/release:<your-branch>
137135

138-
# This step would stop after creation of ./manifests folder. All resources placed there will be created in the cluster
139-
# during bootstrap and would override the default state of the resource in the cluster.
140-
openshift-install create manifests
141-
142-
cat <<EOF > manifests/manifest_feature_gate.yaml
143-
apiVersion: config.openshift.io/v1
144-
kind: FeatureGate
145-
metadata:
146-
annotations:
147-
include.release.openshift.io/self-managed-high-availability: "true"
148-
include.release.openshift.io/single-node-developer: "true"
149-
release.openshift.io/create-only: "true"
150-
name: cluster
151-
spec:
152-
customNoUpgrade:
153-
enabled:
154-
- ExternalCloudProvider
155-
- CSIMigrationAWS
156-
- CSIMigrationOpenStack
157-
featureSet: CustomNoUpgrade
158-
EOF
159-
160136
# Now you could create a cluster with your custom release image
161137
openshift-install create cluster
162138
```

pkg/controllers/clusteroperator_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func (r *CloudOperatorReconciler) provisioningAllowed(ctx context.Context, infra
244244
}
245245

246246
// Verify FeatureGate ExternalCloudProvider is enabled for operator to work in TP phase
247-
external, err := cloudprovider.IsCloudProviderExternal(infra.Status.PlatformStatus, r.FeatureGateAccess)
247+
external, err := cloudprovider.IsCloudProviderExternal(infra.Status.PlatformStatus)
248248
if err != nil {
249249
klog.Errorf("Could not determine external cloud provider state: %v", err)
250250

@@ -254,7 +254,7 @@ func (r *CloudOperatorReconciler) provisioningAllowed(ctx context.Context, infra
254254
}
255255
return false, err
256256
} else if !external {
257-
klog.Infof("FeatureGate cluster is not specifying external cloud provider requirement. Skipping...")
257+
klog.Infof("Platform does not require an external cloud provider. Skipping...")
258258

259259
if err := r.setStatusAvailable(ctx, conditionOverrides); err != nil {
260260
klog.Errorf("Unable to sync cluster operator status: %s", err)

pkg/controllers/clusteroperator_controller_test.go

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,7 @@ 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-
)
231+
featureGateAccessor := featuregates.NewHardcodedFeatureGateAccess(nil, nil)
235232

236233
kcmStatus := &operatorv1.KubeControllerManagerStatus{
237234
StaticPodOperatorStatus: operatorv1.StaticPodOperatorStatus{
@@ -452,7 +449,7 @@ var _ = Describe("Component sync controller", func() {
452449
Type: configv1.AWSPlatformType,
453450
},
454451
},
455-
featureGate: externalFeatureGateAccessor,
452+
featureGate: featureGateAccessor,
456453
kcmStatus: kcmStatus,
457454
coStatus: coStatus,
458455
expectProvisioned: true,
@@ -466,7 +463,7 @@ var _ = Describe("Component sync controller", func() {
466463
Type: configv1.OpenStackPlatformType,
467464
},
468465
},
469-
featureGate: externalFeatureGateAccessor,
466+
featureGate: featureGateAccessor,
470467
kcmStatus: kcmStatus,
471468
coStatus: coStatus,
472469
expectProvisioned: true,
@@ -480,7 +477,7 @@ var _ = Describe("Component sync controller", func() {
480477
Type: configv1.AWSPlatformType,
481478
},
482479
},
483-
featureGate: externalFeatureGateAccessor,
480+
featureGate: featureGateAccessor,
484481
kcmStatus: &operatorv1.KubeControllerManagerStatus{},
485482
coStatus: coStatus,
486483
expectProvisioned: true,
@@ -494,7 +491,7 @@ var _ = Describe("Component sync controller", func() {
494491
Type: configv1.KubevirtPlatformType,
495492
},
496493
},
497-
featureGate: externalFeatureGateAccessor,
494+
featureGate: featureGateAccessor,
498495
kcmStatus: kcmStatus,
499496
coStatus: coStatus,
500497
expectProvisioned: false,
@@ -532,7 +529,7 @@ var _ = Describe("Component sync controller", func() {
532529
Type: configv1.AWSPlatformType,
533530
},
534531
},
535-
featureGate: externalFeatureGateAccessor,
532+
featureGate: featureGateAccessor,
536533
kcmStatus: &operatorv1.KubeControllerManagerStatus{
537534
StaticPodOperatorStatus: operatorv1.StaticPodOperatorStatus{
538535
OperatorStatus: operatorv1.OperatorStatus{
@@ -558,7 +555,7 @@ var _ = Describe("Component sync controller", func() {
558555
Type: configv1.AWSPlatformType,
559556
},
560557
},
561-
featureGate: externalFeatureGateAccessor,
558+
featureGate: featureGateAccessor,
562559
kcmStatus: &operatorv1.KubeControllerManagerStatus{
563560
StaticPodOperatorStatus: operatorv1.StaticPodOperatorStatus{
564561
OperatorStatus: operatorv1.OperatorStatus{
@@ -584,7 +581,7 @@ var _ = Describe("Component sync controller", func() {
584581
Type: configv1.AWSPlatformType,
585582
},
586583
},
587-
featureGate: externalFeatureGateAccessor,
584+
featureGate: featureGateAccessor,
588585
kcmStatus: kcmStatus,
589586
coStatus: &configv1.ClusterOperatorStatus{
590587
Conditions: []configv1.ClusterOperatorStatusCondition{
@@ -622,7 +619,7 @@ var _ = Describe("Component sync controller", func() {
622619
Type: configv1.AWSPlatformType,
623620
},
624621
},
625-
featureGate: externalFeatureGateAccessor,
622+
featureGate: featureGateAccessor,
626623
kcmStatus: kcmStatus,
627624
coStatus: &configv1.ClusterOperatorStatus{
628625
Conditions: []configv1.ClusterOperatorStatusCondition{

0 commit comments

Comments
 (0)