Skip to content

Commit 381af96

Browse files
Per G. da Silvaperdasilva
Per G. da Silva
authored andcommitted
Update featureflag to WebhookProviderCertManager
Signed-off-by: Per G. da Silva <[email protected]>
1 parent f905398 commit 381af96

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

internal/operator-controller/features/features.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const (
1313
// Ex: SomeFeature featuregate.Feature = "SomeFeature"
1414
PreflightPermissions featuregate.Feature = "PreflightPermissions"
1515
SingleOwnNamespaceInstallSupport featuregate.Feature = "SingleOwnNamespaceInstallSupport"
16-
WebhookSupport featuregate.Feature = "WebhookSupport"
16+
WebhookProviderCertManager featuregate.Feature = "WebhookProviderCertManager"
1717
)
1818

1919
var operatorControllerFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
@@ -34,10 +34,11 @@ var operatorControllerFeatureGates = map[featuregate.Feature]featuregate.Feature
3434
LockToDefault: false,
3535
},
3636

37-
// WebhookSupport enables support for installing
37+
// WebhookProviderCertManager enables support for installing
3838
// registry+v1 cluster extensions that include validating,
39-
// mutating, and/or conversion webhooks
40-
WebhookSupport: {
39+
// mutating, and/or conversion webhooks with CertManager
40+
// as the certificate provider.
41+
WebhookProviderCertManager: {
4142
Default: false,
4243
PreRelease: featuregate.Alpha,
4344
LockToDefault: false,

internal/operator-controller/rukpak/convert/registryv1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ func (c Converter) Convert(rv1 render.RegistryV1, installNamespace string, targe
263263
return nil, fmt.Errorf("apiServiceDefintions are not supported")
264264
}
265265

266-
if !features.OperatorControllerFeatureGate.Enabled(features.WebhookSupport) && len(rv1.CSV.Spec.WebhookDefinitions) > 0 {
266+
if !features.OperatorControllerFeatureGate.Enabled(features.WebhookProviderCertManager) && len(rv1.CSV.Spec.WebhookDefinitions) > 0 {
267267
return nil, fmt.Errorf("webhookDefinitions are not supported")
268268
}
269269

internal/operator-controller/rukpak/convert/registryv1_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ func TestRegistryV1SuiteGenerateNoWebhooks(t *testing.T) {
563563
}
564564

565565
func TestRegistryV1SuiteGenerateWebhooks_WebhookSupportFGEnabled(t *testing.T) {
566-
featuregatetesting.SetFeatureGateDuringTest(t, features.OperatorControllerFeatureGate, features.WebhookSupport, true)
566+
featuregatetesting.SetFeatureGateDuringTest(t, features.OperatorControllerFeatureGate, features.WebhookProviderCertManager, true)
567567
t.Log("RegistryV1 Suite Convert")
568568
t.Log("It should generate objects successfully based on target namespaces")
569569

0 commit comments

Comments
 (0)