Skip to content

📖 Bundle Deployment Configuration#2528

Open
anik120 wants to merge 1 commit intooperator-framework:mainfrom
anik120:deploymentconfig-docs
Open

📖 Bundle Deployment Configuration#2528
anik120 wants to merge 1 commit intooperator-framework:mainfrom
anik120:deploymentconfig-docs

Conversation

@anik120
Copy link
Member

@anik120 anik120 commented Feb 25, 2026

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 20:36
@netlify
Copy link

netlify bot commented Feb 25, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 86ce4b8
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/699f5d49b654c60008fc3bd2
😎 Deploy Preview https://deploy-preview-2528--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 grokspawn 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

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

This pull request adds comprehensive documentation for the Bundle Deployment Configuration feature, which enables users to customize operator deployment settings in OLMv1. The feature provides parity with OLMv0's Subscription.spec.config functionality, allowing customization of resource requirements, node placement, environment variables, storage, and annotations.

Changes:

  • Added detailed documentation explaining the Bundle Deployment Configuration feature and its use cases
  • Provided configuration examples for environment variables, resources, node placement (selectors, tolerations, affinity), storage, and annotations
  • Included migration guide from OLM v0 to OLM v1
  • Documented validation schema generation and error handling

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

Comment on lines +81 to +82
config:
inline:
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.

Copilot uses AI. Check for mistakes.
Comment on lines +328 to +329
config:
env:
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.

Copilot uses AI. Check for mistakes.
custom.annotation/key: "value"
```

**Behavior**: Annotations are merged with existing annotations. If the same annotation key exists in both the bundle and the configuration, the bundle's annotation value takes precedence.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The behavior description for annotations is incorrect. According to the implementation in internal/operator-controller/rukpak/render/registryv1/generators/generators.go lines 772-796, existing deployment and pod annotations take precedence over config annotations (no override). The documentation states the opposite - that "the bundle's annotation value takes precedence". The correct behavior is that annotations from the bundle are NOT overridden by the deploymentConfig annotations.

Suggested change
**Behavior**: Annotations are merged with existing annotations. If the same annotation key exists in both the bundle and the configuration, the bundle's annotation value takes precedence.
**Behavior**: Annotations are merged with existing annotations. If the same annotation key exists in both the bundle and the `deploymentConfig`, the existing annotation from the bundle is preserved and the `deploymentConfig` value is ignored.

Copilot uses AI. Check for mistakes.
Comment on lines +192 to +193
config:
inline:
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.

Copilot uses AI. Check for mistakes.
catalog:
packageName: my-operator
channel: stable
config:
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.

Suggested change
config:
config:
configType: Inline

Copilot uses AI. Check for mistakes.
Comment on lines +217 to +218
config:
inline:
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.

Copilot uses AI. Check for mistakes.
catalog:
packageName: production-operator
version: 1.2.3
config:
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The config examples are missing the required configType field. According to the ClusterExtension API definition (api/v1/clusterextension_types.go), the config.configType field is required and must be set to "Inline" when using inline configuration. All examples should include configType: Inline before the inline: field.

Suggested change
config:
config:
configType: Inline

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +7
!!! note
This feature is still in `alpha` and the `DeploymentConfig` feature gate must be enabled to make use of it.
See the instructions below on how to enable it.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The note incorrectly states that the DeploymentConfig feature gate must be enabled. No such feature gate exists in the codebase (verified in internal/operator-controller/features/features.go). The deploymentConfig functionality appears to be available by default without any feature gate requirement.

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +36
## Enabling the Feature Gate

To enable the Bundle Deployment Configuration feature gate, you need to patch the `operator-controller-controller-manager` deployment in the `olmv1-system` namespace. This will add the `--feature-gates=DeploymentConfig=true` argument to the manager container.

1. **Patch the deployment:**

```bash
kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=DeploymentConfig=true"}]'
```

2. **Wait for the controller manager pods to be ready:**

```bash
kubectl -n olmv1-system wait --for=condition=ready pods -l app.kubernetes.io/name=operator-controller
```

Once the above wait condition is met, the `DeploymentConfig` feature gate should be enabled in operator-controller.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The documentation incorrectly states that a DeploymentConfig feature gate must be enabled. After reviewing the codebase, no such feature gate exists in internal/operator-controller/features/features.go. The deploymentConfig functionality appears to be always available in the registry+v1 bundle config schema (internal/operator-controller/rukpak/bundle/registryv1.go) without any feature gate requirement. This entire section about enabling the feature gate should be removed or corrected.

Copilot uses AI. Check for mistakes.

## Migration from OLM v0

If you're migrating from OLM v0, you can directly transfer your `Subscription.spec.config` settings to the `deploymentConfig` object within `ClusterExtension.spec.config.inline`. The structure is identical.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The statement "The structure is identical" could be clearer. While the structure of the configuration fields (env, resources, etc.) is identical, the location differs: in OLM v0 these fields are directly under Subscription.spec.config, whereas in OLM v1 they're nested under ClusterExtension.spec.config.inline.deploymentConfig. Consider rephrasing to: "The structure of the configuration fields is identical - simply nest your Subscription.spec.config settings under the deploymentConfig key within ClusterExtension.spec.config.inline."

Suggested change
If you're migrating from OLM v0, you can directly transfer your `Subscription.spec.config` settings to the `deploymentConfig` object within `ClusterExtension.spec.config.inline`. The structure is identical.
If you're migrating from OLM v0, the structure of the configuration fields is identical — simply nest your `Subscription.spec.config` settings under the `deploymentConfig` key within `ClusterExtension.spec.config.inline`.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.00%. Comparing base (dfd25de) to head (86ce4b8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2528      +/-   ##
==========================================
- Coverage   72.04%   72.00%   -0.05%     
==========================================
  Files         103      103              
  Lines        8690     8690              
==========================================
- Hits         6261     6257       -4     
- Misses       1946     1948       +2     
- Partials      483      485       +2     
Flag Coverage Δ
e2e 45.31% <ø> (-0.03%) ⬇️
experimental-e2e 53.55% <ø> (-0.09%) ⬇️
unit 57.13% <ø> (ø)

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.

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.

2 participants