-
Notifications
You must be signed in to change notification settings - Fork 26
Add OLM support #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
creydr
wants to merge
7
commits into
kubernetes-sigs:main
Choose a base branch
from
creydr:olm-bundle-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add OLM support #218
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
324a292
feat: add OLM bundle support
creydr a9e992d
feat: add Kind cluster creation script with local registry
creydr 66c4e66
feat: add OLM bundle e2e tests
creydr 7b294ee
feat: support WATCH_NAMESPACE for namespace-scoped watching
creydr 8b20c47
ci: add OLM bundle e2e test workflow
creydr 76e5fac
Fix lint issues
creydr 7653a22
docs: document OLM bundle and e2e test workflows
creydr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,3 +18,6 @@ | |
| !api/ | ||
| !internal/ | ||
| !hack/ | ||
|
|
||
| # Re-include bundle for OLM bundle image builds | ||
| !bundle/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: OLM Bundle E2E Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: ['main'] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test-e2e-bundle: | ||
| name: Run on Ubuntu | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone the code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 | ||
| with: | ||
| go-version-file: go.mod | ||
|
|
||
| - name: Install the latest version of kind | ||
| run: | | ||
| curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-$(go env GOARCH) | ||
| chmod +x ./kind | ||
| sudo mv ./kind /usr/local/bin/kind | ||
|
|
||
| - name: Deploy operator bundle to Kind cluster | ||
| run: make deploy-test-e2e-bundle | ||
|
|
||
| - name: Run OLM bundle e2e tests | ||
| run: make test-e2e-bundle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| FROM scratch | ||
|
|
||
| # Core bundle labels. | ||
| LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 | ||
| LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ | ||
| LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ | ||
| LABEL operators.operatorframework.io.bundle.package.v1=mcp-lifecycle-operator | ||
| LABEL operators.operatorframework.io.bundle.channels.v1=alpha | ||
| LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha | ||
| LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.41.1 | ||
| LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 | ||
| LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 | ||
|
|
||
| # Labels for testing. | ||
| LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 | ||
| LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ | ||
|
|
||
| # Copy files to locations specified by labels. | ||
| COPY bundle/manifests /manifests/ | ||
| COPY bundle/metadata /metadata/ | ||
| COPY bundle/tests/scorecard /tests/scorecard/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
config/manifests/bases/mcp-lifecycle-operator.clusterserviceversion.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: ClusterServiceVersion | ||
| metadata: | ||
| annotations: | ||
| alm-examples: '[]' | ||
| capabilities: Basic Install | ||
| name: mcp-lifecycle-operator.v0.0.0 | ||
| namespace: placeholder | ||
| spec: | ||
| apiservicedefinitions: {} | ||
| customresourcedefinitions: | ||
| owned: | ||
| - description: "MCPServer runs a Model Context Protocol (MCP) server in Kubernetes.\n\nMCPServer | ||
| creates and manages a Deployment and Service to run an MCP server from a\ncontainer | ||
| image. The MCP server exposes tools, resources, and prompts that AI applications\ncan | ||
| use via the Model Context Protocol.\n\nExample:\n\n\tapiVersion: mcp.x-k8s.io/v1alpha1\n\tkind: | ||
| MCPServer\n\tmetadata:\n\t name: example\n\tspec:\n\t source:\n\t type: | ||
| ContainerImage\n\t containerImage:\n\t ref: example-mcp-image\n\t | ||
| \ config:\n\t port: 8080\n\nThe controller manages Deployment and Service | ||
| resources with the same name as the MCPServer,\nusing ownerReferences to establish | ||
| ownership. The controller will reject updates to resources\nowned by other | ||
| controllers or resources with no controller owner (to prevent silent overwrites\nof | ||
| manually-created resources), but will adopt orphaned resources from a deleted | ||
| MCPServer\nwith the same name to enable seamless recreation." | ||
| displayName: MCPServer | ||
| kind: MCPServer | ||
| name: mcpservers.mcp.x-k8s.io | ||
| version: v1alpha1 | ||
| description: Kubernetes operator for managing MCP (Model Context Protocol) server | ||
| lifecycles. | ||
| displayName: MCP Lifecycle Operator | ||
| icon: | ||
| - base64data: "" | ||
| mediatype: "" | ||
| install: | ||
| spec: | ||
| deployments: null | ||
| strategy: "" | ||
| installModes: | ||
| - supported: true | ||
| type: OwnNamespace | ||
| - supported: true | ||
| type: SingleNamespace | ||
| - supported: true | ||
| type: MultiNamespace | ||
| - supported: true | ||
| type: AllNamespaces | ||
| keywords: | ||
| - mcp | ||
| - model-context-protocol | ||
| - ai | ||
| links: | ||
| - name: GitHub | ||
| url: https://github.com/kubernetes-sigs/mcp-lifecycle-operator | ||
| maintainers: | ||
| - email: cncf-mcp-lifecycle-operator-maintainers@lists.cncf.io | ||
| name: MCP Lifecycle Operator Maintainers | ||
| maturity: alpha | ||
| minKubeVersion: 1.32.0 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure here, I only took an older version |
||
| provider: | ||
| name: kubernetes-sigs | ||
| version: 0.0.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| resources: | ||
| - bases/mcp-lifecycle-operator.clusterserviceversion.yaml | ||
| - ../default | ||
| - ../samples | ||
| - ../scorecard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| apiVersion: scorecard.operatorframework.io/v1alpha3 | ||
| kind: Configuration | ||
| metadata: | ||
| name: config | ||
| stages: | ||
| - parallel: true | ||
| tests: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| resources: | ||
| - bases/config.yaml | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| patches: | ||
| - path: patches/basic.config.yaml | ||
| target: | ||
| group: scorecard.operatorframework.io | ||
| kind: Configuration | ||
| name: config | ||
| version: v1alpha3 | ||
| - path: patches/olm.config.yaml | ||
| target: | ||
| group: scorecard.operatorframework.io | ||
| kind: Configuration | ||
| name: config | ||
| version: v1alpha3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| - op: add | ||
| path: /stages/0/tests/- | ||
| value: | ||
| entrypoint: | ||
| - scorecard-test | ||
| - basic-check-spec | ||
| image: quay.io/operator-framework/scorecard-test:v1.41.1 | ||
| labels: | ||
| suite: basic | ||
| test: basic-check-spec-test |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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