@@ -67,6 +67,8 @@ import (
6767 "github.com/operator-framework/operator-controller/internal/operator-controller/resolve"
6868 "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/convert"
6969 "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/preflights/crdupgradesafety"
70+ "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/render"
71+ "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/render/certproviders"
7072 "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/render/registryv1"
7173 "github.com/operator-framework/operator-controller/internal/operator-controller/scheme"
7274 fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
@@ -190,7 +192,7 @@ func run() error {
190192 secretParts := strings .Split (cfg .globalPullSecret , "/" )
191193 if len (secretParts ) != 2 {
192194 err := fmt .Errorf ("incorrect number of components" )
193- setupLog .Error (err , "value of global-pull-secret should be of the format <namespace>/<name>" )
195+ setupLog .Error (err , "Value of global-pull-secret should be of the format <namespace>/<name>" )
194196 return err
195197 }
196198 globalPullSecretKey = & k8stypes.NamespacedName {Name : secretParts [1 ], Namespace : secretParts [0 ]}
@@ -422,12 +424,23 @@ func run() error {
422424 preAuth = authorization .NewRBACPreAuthorizer (mgr .GetClient ())
423425 }
424426
427+ // determine if a certificate provider should be set in the bundle renderer and feature support for the provider
428+ // based on the feature flag
429+ var certProvider render.CertificateProvider
430+ var isWebhookSupportEnabled bool
431+ if features .OperatorControllerFeatureGate .Enabled (features .WebhookProviderCertManager ) {
432+ certProvider = certproviders.CertManagerCertificateProvider {}
433+ isWebhookSupportEnabled = true
434+ }
435+
425436 // now initialize the helmApplier, assigning the potentially nil preAuth
426437 helmApplier := & applier.Helm {
427438 ActionClientGetter : acg ,
428439 Preflights : preflights ,
429440 BundleToHelmChartConverter : & convert.BundleToHelmChartConverter {
430- BundleRenderer : registryv1 .Renderer ,
441+ BundleRenderer : registryv1 .Renderer ,
442+ CertificateProvider : certProvider ,
443+ IsWebhookSupportEnabled : isWebhookSupportEnabled ,
431444 },
432445 PreAuthorizer : preAuth ,
433446 }
0 commit comments