Skip to content

Commit

Permalink
fixup! ✨ Plumb the Extension API
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Short <[email protected]>
  • Loading branch information
tmshort committed Feb 14, 2024
1 parent a5c894b commit 8e39443
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func main() {
setupLog.Error(err, "unable to create controller", "controller", "ClusterExtension")
os.Exit(1)
}
if features.OperatorControllerFeatureGate.Enabled(features.EnableExtensionApi) {
if features.OperatorControllerFeatureGate.Enabled(features.EnableExtensionAPI) {
if err = (&controllers.ExtensionReconciler{
Client: cl,
BundleProvider: catalogClient,
Expand Down
2 changes: 1 addition & 1 deletion internal/controllers/extension_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (*ExtensionReconciler) checkForUnexpectedFieldChange(a, b ocv1alpha1.Extens
// to return different results (e.g. requeue).
//
//nolint:unparam
func (r *ExtensionReconciler) reconcile(ctx context.Context, ext *ocv1alpha1.Extension) (ctrl.Result, error) {
func (r *ExtensionReconciler) reconcile(_ context.Context, ext *ocv1alpha1.Extension) (ctrl.Result, error) {
// Don't do anything if Paused
if ext.Spec.Managed == ocv1alpha1.ManagedStatePaused {
return ctrl.Result{}, nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ const (
// Ex: SomeFeature featuregate.Feature = "SomeFeature"

ForceSemverUpgradeConstraints featuregate.Feature = "ForceSemverUpgradeConstraints"
EnableExtensionApi featuregate.Feature = "EnableExtensionApi"
EnableExtensionAPI featuregate.Feature = "EnableExtensionApi"
)

var operatorControllerFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
// Add new feature gate definitions
// Ex: SomeFeature: {...}

ForceSemverUpgradeConstraints: {Default: false, PreRelease: featuregate.Alpha},
EnableExtensionApi: {Default: false, PreRelease: featuregate.Alpha},
EnableExtensionAPI: {Default: false, PreRelease: featuregate.Alpha},
}

var OperatorControllerFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate()
Expand Down

0 comments on commit 8e39443

Please sign in to comment.