Skip to content

Add OLM support#218

Open
creydr wants to merge 7 commits into
kubernetes-sigs:mainfrom
creydr:olm-bundle-support
Open

Add OLM support#218
creydr wants to merge 7 commits into
kubernetes-sigs:mainfrom
creydr:olm-bundle-support

Conversation

@creydr
Copy link
Copy Markdown
Contributor

@creydr creydr commented Jun 2, 2026

Fixes #215

Changes

  • Add operator-sdk based OLM bundle generation (make bundle). This allows to maintain only a minimal CSV skeleton manually (deployment spec, RBAC, and CRDs are auto-generated from existing kustomize manifests).
  • Add hack/create-kind-cluster.sh for creating Kind clusters with a local registry (needed for bundle e2e tests, as operator-sdk run bundle requires the image in a registry other than local)
  • Add OLM bundle e2e tests verifying all four install modes: OwnNamespace, SingleNamespace, MultiNamespace, and AllNamespaces.
  • Support WATCH_NAMESPACE environment variable for namespace-scoped watching, populated by OLM via the olm.targetNamespaces annotation.
  • Add CI workflow for OLM bundle e2e tests.

Hints

  1. This PR got a bit bigger as initially planned. But not sure if splitting the commits into separate PRs would make sense, because the "depend" on each other.
  2. When building the bundle image later in a release pipeline, we can pass the "productized" controller image via the IMG var to the makefile target: IMG=registry.k8s.io/mcp...@sha:asdf make bundle bundle-build bundle-push. Also the target bundle image can be named via the BUNDLE_IMG var

creydr added 6 commits June 1, 2026 15:01
Add operator-sdk based OLM bundle generation. The bundle is
auto-generated from existing kustomize manifests via `make bundle`.
Only a minimal CSV skeleton with human-curated metadata is maintained
manually; deployment spec, RBAC, and CRDs are injected automatically
by operator-sdk.
Add hack/create-kind-cluster.sh that creates a Kind cluster with an
HTTP container registry for local development. Supports named params
for cluster name, registry port, and container tool (docker/podman).

Update Makefile to use the script in setup-test-e2e and derive IMG
and BUNDLE_IMG from a configurable REGISTRY variable.
Add e2e tests that verify the operator installs and works via OLM
across all four install modes: OwnNamespace, SingleNamespace,
MultiNamespace, and AllNamespaces.

Tests use operator-sdk run bundle to install the operator via OLM,
then create MCPServer resources and verify reconciliation.
Read the WATCH_NAMESPACE environment variable (comma-separated) to
restrict the controller's cache to specific namespaces. When installed
via OLM, this is populated from the olm.targetNamespaces annotation,
enabling OwnNamespace, SingleNamespace, and MultiNamespace install
modes. When unset, the operator watches all namespaces.
Run OLM bundle e2e tests on pull requests, verifying operator
installation via OLM across all four install modes.
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 2, 2026

Deploy Preview for mcp-lifecycle-operator ready!

Name Link
🔨 Latest commit 7653a22
🔍 Latest deploy log https://app.netlify.com/projects/mcp-lifecycle-operator/deploys/6a1eb3b7275197000813caa7
😎 Deploy Preview https://deploy-preview-218--mcp-lifecycle-operator.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.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: creydr
Once this PR has been reviewed and has the lgtm label, please assign aliok 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

@k8s-ci-robot k8s-ci-robot requested review from matzew and mrunalp June 2, 2026 10:07
@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 2, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @creydr. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 2, 2026
Comment on lines +56 to +57
- email: cncf-mcp-lifecycle-operator-maintainers@lists.cncf.io
name: MCP Lifecycle Operator Maintainers
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is more a placeholder for now, but should be adjusted, before we build the bundle

- email: cncf-mcp-lifecycle-operator-maintainers@lists.cncf.io
name: MCP Lifecycle Operator Maintainers
maturity: alpha
minKubeVersion: 1.32.0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure here, I only took an older version

Add development workflow documentation for OLM bundle generation,
e2e testing targets, and Kind cluster setup with local registry.
@creydr creydr changed the title Add OLM bundle support Add OLM support Jun 2, 2026
@creydr
Copy link
Copy Markdown
Contributor Author

creydr commented Jun 2, 2026

/cc @matzew

@aliok
Copy link
Copy Markdown
Member

aliok commented Jun 3, 2026

/hold

Let's hold this as discussed online.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OLM support

3 participants