Skip to content

✨ Add feature gate for registry+v1 bundle deploymentConfig#2527

Open
tmshort wants to merge 1 commit intooperator-framework:mainfrom
tmshort:config-api-fg
Open

✨ Add feature gate for registry+v1 bundle deploymentConfig#2527
tmshort wants to merge 1 commit intooperator-framework:mainfrom
tmshort:config-api-fg

Conversation

@tmshort
Copy link
Contributor

@tmshort tmshort commented Feb 25, 2026

Wraps the deploymentConfig API feature (spec.config.inline.deploymentConfig) behind a new Alpha feature gate so it can be disabled by default and is only enabled in experimental manifests.

When the gate is disabled, deploymentConfig is removed from the bundle's config schema before validation, giving users a clear "unknown field" error rather than silently ignoring the configuration.

Assisted-by: Claude

Description

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Copilot AI review requested due to automatic review settings February 25, 2026 19:15
@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 3fd9c27
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/699f687c5a83da0008838ac6
😎 Deploy Preview https://deploy-preview-2527--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci
Copy link

openshift-ci bot commented Feb 25, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign oceanc80 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tmshort tmshort changed the title ✨ Add DeploymentConfig feature gate for registry+v1 bundle deployment c… ✨ Add feature gate for registry+v1 bundle deploymentConfig Feb 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new alpha feature gate (DeploymentConfig) to control support for spec.config.inline.deploymentConfig in ClusterExtension resources, defaulting the capability off and enabling it only in experimental install paths.

Changes:

  • Introduces features.DeploymentConfig (alpha, default false) and wires it into operator-controller startup.
  • When disabled, removes deploymentConfig from the registry+v1 bundle config schema prior to validation to surface an “unknown field” error.
  • Updates unit/e2e tests and experimental manifests/Helm values to enable and validate the behavior.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/operator-controller/features/features.go Defines the new DeploymentConfig alpha feature gate.
cmd/operator-controller/main.go Plumbs the feature gate into RegistryV1ManifestProvider creation.
internal/operator-controller/applier/provider.go Gates schema acceptance + render option extraction for deploymentConfig.
internal/operator-controller/applier/provider_test.go Ensures behavior is terminal-error when the gate is disabled; enables gate for existing tests.
manifests/experimental.yaml Enables DeploymentConfig in experimental deployment args.
manifests/experimental-e2e.yaml Enables DeploymentConfig in experimental-e2e deployment args.
helm/experimental.yaml Enables DeploymentConfig in experimental Helm values.
test/e2e/steps/hooks.go Adds the gate to the e2e feature-gate skip map (default false).
test/e2e/features/install.feature Adds an e2e scenario asserting nodeSelector from deploymentConfig is applied.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.04%. Comparing base (dfd25de) to head (3fd9c27).

Files with missing lines Patch % Lines
internal/operator-controller/applier/provider.go 80.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2527      +/-   ##
==========================================
- Coverage   72.04%   72.04%   -0.01%     
==========================================
  Files         103      103              
  Lines        8690     8695       +5     
==========================================
+ Hits         6261     6264       +3     
- Misses       1946     1947       +1     
- Partials      483      484       +1     
Flag Coverage Δ
e2e 45.30% <45.45%> (-0.04%) ⬇️
experimental-e2e 54.22% <54.54%> (+0.59%) ⬆️
unit 57.14% <72.72%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ustomization

Wraps the deploymentConfig API feature (spec.config.inline.deploymentConfig)
behind a new Alpha feature gate so it can be disabled by default and is only
enabled in experimental manifests.

When the gate is disabled, deploymentConfig is removed from the bundle's
config schema before validation, giving users a clear "unknown field" error
rather than silently ignoring the configuration.

Assisted-by: Claude
Signed-off-by: Todd Short <tshort@redhat.com>
And ClusterExtensionRevision "${NAME}-1" has label "olm.operatorframework.io/owner-kind" with value "ClusterExtension"
And ClusterExtensionRevision "${NAME}-1" has label "olm.operatorframework.io/owner-name" with value "${NAME}"

@DeploymentConfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we care about exercising each of the different deployment config options? (or maybe all of them at once?)

matchLabels:
"olm.operatorframework.io/metadata.name": test-catalog
"""
Then ClusterExtension is rolled out
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we don't care about whether it rolled out successfully as much as that the deployment exists and the spec matches what we want? maybe this gets tested on clusters that don't have linux nodes, or something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants