@@ -32,7 +32,6 @@ import (
3232 "github.com/spf13/cobra"
3333 corev1 "k8s.io/api/core/v1"
3434 rbacv1 "k8s.io/api/rbac/v1"
35- apiextensionsv1client "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1"
3635 "k8s.io/apimachinery/pkg/fields"
3736 "k8s.io/apimachinery/pkg/labels"
3837 k8slabels "k8s.io/apimachinery/pkg/labels"
@@ -62,16 +61,13 @@ import (
6261 "github.com/operator-framework/operator-controller/internal/operator-controller/action"
6362 "github.com/operator-framework/operator-controller/internal/operator-controller/applier"
6463 "github.com/operator-framework/operator-controller/internal/operator-controller/authentication"
65- "github.com/operator-framework/operator-controller/internal/operator-controller/authorization"
6664 "github.com/operator-framework/operator-controller/internal/operator-controller/catalogmetadata/cache"
6765 catalogclient "github.com/operator-framework/operator-controller/internal/operator-controller/catalogmetadata/client"
6866 "github.com/operator-framework/operator-controller/internal/operator-controller/contentmanager"
6967 "github.com/operator-framework/operator-controller/internal/operator-controller/controllers"
7068 "github.com/operator-framework/operator-controller/internal/operator-controller/features"
7169 "github.com/operator-framework/operator-controller/internal/operator-controller/finalizers"
7270 "github.com/operator-framework/operator-controller/internal/operator-controller/resolve"
73- "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/convert"
74- "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/preflights/crdupgradesafety"
7571 "github.com/operator-framework/operator-controller/internal/operator-controller/scheme"
7672 fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
7773 httputil "github.com/operator-framework/operator-controller/internal/shared/util/http"
@@ -408,29 +404,34 @@ func run() error {
408404 },
409405 }
410406
411- aeClient , err := apiextensionsv1client .NewForConfig (mgr .GetConfig ())
412- if err != nil {
413- setupLog .Error (err , "unable to create apiextensions client" )
414- return err
415- }
407+ // aeClient, err := apiextensionsv1client.NewForConfig(mgr.GetConfig())
408+ // if err != nil {
409+ // setupLog.Error(err, "unable to create apiextensions client")
410+ // return err
411+ // }
416412
417- preflights := []applier.Preflight {
418- crdupgradesafety .NewPreflight (aeClient .CustomResourceDefinitions ()),
419- }
413+ // preflights := []applier.Preflight{
414+ // crdupgradesafety.NewPreflight(aeClient.CustomResourceDefinitions()),
415+ // }
416+
417+ // // determine if PreAuthorizer should be enabled based on feature gate
418+ // var preAuth authorization.PreAuthorizer
419+ // if features.OperatorControllerFeatureGate.Enabled(features.PreflightPermissions) {
420+ // preAuth = authorization.NewRBACPreAuthorizer(mgr.GetClient())
421+ // }
420422
421- // determine if PreAuthorizer should be enabled based on feature gate
422- var preAuth authorization.PreAuthorizer
423- if features .OperatorControllerFeatureGate .Enabled (features .PreflightPermissions ) {
424- preAuth = authorization .NewRBACPreAuthorizer (mgr .GetClient ())
423+ boxcutterApplier := & applier.Boxcutter {
424+ Client : mgr .GetClient (),
425+ Scheme : mgr .GetScheme (),
425426 }
426427
427428 // now initialize the helmApplier, assigning the potentially nil preAuth
428- helmApplier := & applier.Helm {
429- ActionClientGetter : acg ,
430- Preflights : preflights ,
431- BundleToHelmChartFn : convert .RegistryV1ToHelmChart ,
432- PreAuthorizer : preAuth ,
433- }
429+ // helmApplier := &applier.Helm{
430+ // ActionClientGetter: acg,
431+ // Preflights: preflights,
432+ // BundleToHelmChartFn: convert.RegistryV1ToHelmChart,
433+ // PreAuthorizer: preAuth,
434+ // }
434435
435436 cm := contentmanager .NewManager (clientRestConfigMapper , mgr .GetConfig (), mgr .GetRESTMapper ())
436437 err = clusterExtensionFinalizers .Register (controllers .ClusterExtensionCleanupContentManagerCacheFinalizer , finalizers .FinalizerFunc (func (ctx context.Context , obj client.Object ) (crfinalizer.Result , error ) {
@@ -473,7 +474,7 @@ func run() error {
473474 Resolver : resolver ,
474475 ImageCache : imageCache ,
475476 ImagePuller : imagePuller ,
476- Applier : helmApplier ,
477+ Applier : boxcutterApplier ,
477478 InstalledBundleGetter : & controllers.DefaultInstalledBundleGetter {ActionClientGetter : acg },
478479 Finalizers : clusterExtensionFinalizers ,
479480 Manager : cm ,
0 commit comments