@@ -67,6 +67,8 @@ import (
67
67
"github.com/operator-framework/operator-controller/internal/operator-controller/resolve"
68
68
"github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/convert"
69
69
"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"
70
72
"github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/render/registryv1"
71
73
"github.com/operator-framework/operator-controller/internal/operator-controller/scheme"
72
74
fsutil "github.com/operator-framework/operator-controller/internal/shared/util/fs"
@@ -190,7 +192,7 @@ func run() error {
190
192
secretParts := strings .Split (cfg .globalPullSecret , "/" )
191
193
if len (secretParts ) != 2 {
192
194
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>" )
194
196
return err
195
197
}
196
198
globalPullSecretKey = & k8stypes.NamespacedName {Name : secretParts [1 ], Namespace : secretParts [0 ]}
@@ -422,12 +424,23 @@ func run() error {
422
424
preAuth = authorization .NewRBACPreAuthorizer (mgr .GetClient ())
423
425
}
424
426
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
+
425
436
// now initialize the helmApplier, assigning the potentially nil preAuth
426
437
helmApplier := & applier.Helm {
427
438
ActionClientGetter : acg ,
428
439
Preflights : preflights ,
429
440
BundleToHelmChartConverter : & convert.BundleToHelmChartConverter {
430
- BundleRenderer : registryv1 .Renderer ,
441
+ BundleRenderer : registryv1 .Renderer ,
442
+ CertificateProvider : certProvider ,
443
+ IsWebhookSupportEnabled : isWebhookSupportEnabled ,
431
444
},
432
445
PreAuthorizer : preAuth ,
433
446
}
0 commit comments