Add OLM support#218
Conversation
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.
✅ Deploy Preview for mcp-lifecycle-operator ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: creydr The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
| - email: cncf-mcp-lifecycle-operator-maintainers@lists.cncf.io | ||
| name: MCP Lifecycle Operator Maintainers |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
|
/cc @matzew |
|
/hold Let's hold this as discussed online. |
Fixes #215
Changes
make bundle). This allows to maintain only a minimal CSV skeleton manually (deployment spec, RBAC, and CRDs are auto-generated from existing kustomize manifests).hack/create-kind-cluster.shfor creating Kind clusters with a local registry (needed for bundle e2e tests, asoperator-sdk run bundlerequires the image in a registry other than local)OwnNamespace,SingleNamespace,MultiNamespace, andAllNamespaces.WATCH_NAMESPACEenvironment variable for namespace-scoped watching, populated by OLM via theolm.targetNamespacesannotation.Hints
IMGvar 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 theBUNDLE_IMGvar