Skip to content

change api group name#29

Merged
Agent-Hellboy merged 1 commit intomainfrom
change_api_group_name_for_crd
Dec 31, 2025
Merged

change api group name#29
Agent-Hellboy merged 1 commit intomainfrom
change_api_group_name_for_crd

Conversation

@Agent-Hellboy
Copy link
Owner

@Agent-Hellboy Agent-Hellboy commented Dec 31, 2025

Summary by CodeRabbit

Breaking Changes

  • Updated MCPServer API group naming. Users must modify existing MCPServer manifest files to reference the new API group format in the apiVersion field to maintain compatibility.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 31, 2025

📝 Walkthrough

Walkthrough

Renames the Kubernetes API group from 'mcp-runtime.org' to 'mcpruntime.org' across API definitions, CRD configurations, RBAC rules, operator implementation, CLI commands, example manifests, and associated tests. Consistent string replacement with no functional behavior changes.

Changes

Cohort / File(s) Summary
API Group Core Definitions
api/v1alpha1/doc.go, api/v1alpha1/groupversion_info.go
Updated groupName annotation and GroupVersion initialization from mcp-runtime.org to mcpruntime.org
Kubernetes Resource Configuration
config/crd/bases/mcpruntime.org_mcpservers.yaml, config/crd/kustomization.yaml, config/rbac/role.yaml
Updated CRD metadata name, kustomization resource reference, and RBAC apiGroups rules to use mcpruntime.org; also renamed CRD manifest file
Operator & Controller Implementation
cmd/operator/main.go, internal/operator/controller.go
Updated LeaderElectionID and kubebuilder RBAC markers to reflect new API group name
CLI Implementation
internal/cli/cluster.go, internal/cli/constants.go, internal/cli/server.go, internal/cli/setup.go
Updated CRD YAML paths, MCPServerCRDName constant, API version strings, and CRD identifiers across cluster initialization, manifest construction, and setup verification
CRD Generation Utilities
pkg/metadata/crd_generator.go
Updated TypeMeta APIVersion in MCPServer generation from mcp-runtime.org/v1alpha1 to mcpruntime.org/v1alpha1
Example Manifests & E2E
examples/mcpserver-example.yaml, examples/mcpserver-example1.yaml, examples/mcpservers-shared-host.yaml, test/e2e/kind.sh
Updated apiVersion field in all MCPServer manifest examples and e2e test scripts to use mcpruntime.org
Unit & Integration Tests
api/v1alpha1/scheme_test.go, cmd/operator/main_test.go, internal/cli/cluster_test.go, internal/cli/setup_helpers_test.go, internal/cli/status_test.go, pkg/metadata/crd_generator_test.go
Updated test expectations, mock responses, and assertion values to reference the new API group name
Configuration & Documentation
.gitignore, README.md
Added c.go, r.go, and tags entries to .gitignore; updated README branding reference

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • initial working commit #1 — Directly modifies the GroupVersion variable in api/v1alpha1/groupversion_info.go, the same core API definition being changed here
  • Improve code coverage #12 — Performs the reverse API group rename (mcp-runtime.org ← mcpruntime.org) across the same set of files including CRD names, RBAC markers, example manifests, and CLI paths
  • Fix post merge CI failure #9 — Updates MCPServerCRDName constant in internal/cli/constants.go and related CRD name references, directly overlapping with this PR's CLI changes

Poem

🐰 Hopping through the codebase with glee,
From hyphens we've set the API free!
mcp-runtime.org took flight,
Now mcpruntime.org shines bright,
Every manifest, every test aligned just right! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'change api group name' directly and accurately describes the main change across all 23 modified files, which systematically update the Kubernetes API group from 'mcp-runtime.org' to 'mcpruntime.org'.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f62b811 and 4dddcf8.

📒 Files selected for processing (24)
  • .gitignore
  • README.md
  • api/v1alpha1/doc.go
  • api/v1alpha1/groupversion_info.go
  • api/v1alpha1/scheme_test.go
  • cmd/operator/main.go
  • cmd/operator/main_test.go
  • config/crd/bases/mcpruntime.org_mcpservers.yaml
  • config/crd/kustomization.yaml
  • config/rbac/role.yaml
  • examples/mcpserver-example.yaml
  • examples/mcpserver-example1.yaml
  • examples/mcpservers-shared-host.yaml
  • internal/cli/cluster.go
  • internal/cli/cluster_test.go
  • internal/cli/constants.go
  • internal/cli/server.go
  • internal/cli/setup.go
  • internal/cli/setup_helpers_test.go
  • internal/cli/status_test.go
  • internal/operator/controller.go
  • pkg/metadata/crd_generator.go
  • pkg/metadata/crd_generator_test.go
  • test/e2e/kind.sh
🧰 Additional context used
🪛 LanguageTool
README.md

[grammar] ~302-~302: Zin met fouten
Context: ...ng) The platform uses mcpruntime.org as the default API group. If you want to u...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~302-~302: Zin met fouten
Context: ... The platform uses mcpruntime.org as the default API group. If you want to use y...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~302-~302: Zin met fouten
Context: ...e platform uses mcpruntime.org as the default API group. If you want to use your orga...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~302-~302: Zin met fouten
Context: ...uses mcpruntime.org as the default API group. If you want to use your organization's...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~302-~302: Fout gevonden
Context: ... want to use your organization's domain for branding: 1. Fork the repository 2. Up...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Unit + Integration Tests
🔇 Additional comments (26)
.gitignore (1)

20-22: Verify that these gitignore additions are related to the API group rename.

Lines 20-22 add three new ignore entries (c.go, r.go, tags) that appear unrelated to the API group name change from 'mcp-runtime.org' to 'mcpruntime.org'. Clarify whether these are:

  1. Generated files that resulted from re-running code generation with the new API group?
  2. Build artifacts that should be committed separately?
  3. Development/IDE artifacts that are incidental to this PR?

If these are legitimate, please confirm their relevance to avoid scope creep in the PR.

README.md (1)

302-302: Documentation updated to reflect new API group.

The branding section correctly documents the new mcpruntime.org API group name. This aligns with the changes across the codebase.

api/v1alpha1/doc.go (1)

2-2: Code generation directive updated correctly.

The groupName annotation has been updated to mcpruntime.org, which is essential for Kubernetes code generation tools. This aligns with the GroupVersion definition in groupversion_info.go.

examples/mcpserver-example1.yaml (1)

1-1: Example manifest updated correctly.

The apiVersion field has been updated to reflect the new API group. This example now correctly demonstrates how to use the renamed API group.

cmd/operator/main.go (1)

108-108: Leader election ID updated - note the breaking change implications.

The LeaderElectionID has been updated to reflect the new API group. Be aware that in existing deployments with multiple operator replicas, changing this ID will cause both the old and new operators to believe they are the leader until the old operator is fully removed.

Consider documenting this in upgrade notes if this change will be released to existing installations.

pkg/metadata/crd_generator.go (1)

19-19: CRD generator updated correctly.

The APIVersion string has been updated to mcpruntime.org/v1alpha1, ensuring that generated CRD manifests use the correct API group.

pkg/metadata/crd_generator_test.go (1)

40-40: Test assertion updated correctly.

The test expectation has been updated to verify that generated CRDs use the new mcpruntime.org API group. Good practice keeping tests aligned with implementation changes.

config/crd/kustomization.yaml (1)

2-2: LGTM - Resource path updated correctly.

The resource reference has been updated to match the renamed CRD file. The file bases/mcpruntime.org_mcpservers.yaml exists at the specified location.

api/v1alpha1/groupversion_info.go (1)

10-10: No evidence of incomplete migration to verify.

The search for references to the old API group mcp-runtime.org returns no results. All current references throughout the codebase consistently use mcpruntime.org, including CRD definitions, RBAC configurations, examples, and tests. No conversion webhooks or migration tooling is present in the codebase.

The review's claim of a breaking change requiring migration verification is not substantiated by the current codebase state. If a migration from a different API group occurred, it appears to have already been completed. The recommendations for documentation and migration guides are not applicable unless there is evidence of existing deployments using a different API group.

Likely an incorrect or invalid review comment.

examples/mcpservers-shared-host.yaml (1)

1-1: LGTM! API version updated consistently.

The apiVersion fields have been correctly updated to use the new mcpruntime.org API group across both MCPServer resources in this example manifest.

Also applies to: 12-12

api/v1alpha1/scheme_test.go (1)

12-12: LGTM! Test expectations updated correctly.

All test assertions have been properly updated to expect the new mcpruntime.org API group. The test logic remains unchanged—only the expected string values have been updated to match the new API group name.

Also applies to: 37-37, 62-62, 120-121, 143-144

cmd/operator/main_test.go (1)

117-117: LGTM! Leader election ID test updated correctly.

The test expectation has been properly updated to match the new API group in the leader election ID format.

examples/mcpserver-example.yaml (1)

1-1: LGTM! Example manifest updated correctly.

The apiVersion has been properly updated to use the new mcpruntime.org API group.

test/e2e/kind.sh (1)

119-119: LGTM! E2E test manifest updated correctly.

The MCPServer manifest in the e2e test script has been properly updated to use the new mcpruntime.org API group.

config/rbac/role.yaml (1)

63-63: LGTM! RBAC rules updated correctly.

The ClusterRole apiGroups have been properly updated to mcpruntime.org for all MCPServer resource rules (main resource, finalizers, and status subresource). This ensures the operator will have correct permissions for the renamed API group.

Also applies to: 75-75, 81-81

internal/cli/cluster_test.go (1)

870-870: LGTM! Test updated to match new CRD filename.

The test expectation has been correctly updated to reference the new CRD file path with mcpruntime.org in the filename.

internal/cli/cluster.go (1)

187-187: API group renaming is complete across the codebase.

Verification confirms no remaining references to the old mcp-runtime.org API group exist in the codebase. The new mcpruntime.org API group is consistently applied in:

  • CRD definition (config/crd/bases/mcpservers.yaml)
  • Go API definitions (api/v1alpha1/groupversion_info.go)
  • Kubebuilder RBAC markers (internal/operator/controller.go)
  • Unit tests (api/v1alpha1/scheme_test.go)

The breaking change has been properly completed.

internal/cli/constants.go (1)

37-37: API group rename is consistent.

The CRD name constant correctly reflects the new API group mcpruntime.org.

config/crd/bases/mcpruntime.org_mcpservers.yaml (1)

7-9: CRD metadata and group updated correctly.

Both metadata.name and spec.group have been consistently updated to reflect the new API group.

internal/cli/server.go (1)

281-281: API version string updated correctly.

The manifest now references the correct API group mcpruntime.org/v1alpha1.

internal/cli/status_test.go (1)

103-103: Test mock updated to match new CRD name.

The test expectation correctly reflects the renamed CRD.

internal/cli/setup.go (2)

458-458: CRD verification updated correctly.

The CRD installation check now uses the correct CRD name mcpservers.mcpruntime.org.


764-764: CRD manifest path updated correctly.

The file path correctly references the renamed CRD manifest file.

internal/cli/setup_helpers_test.go (2)

508-508: Test expectations updated for new CRD path.

The test correctly validates that the new CRD manifest path is used during operator deployment.


537-537: Error test case updated for new CRD path.

The error scenario test correctly references the new CRD manifest path.

internal/operator/controller.go (1)

68-70: RBAC markers updated for new API group.

The kubebuilder RBAC markers correctly reference mcpruntime.org for all MCPServer resource permissions.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.54%. Comparing base (f62b811) to head (4dddcf8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #29   +/-   ##
=======================================
  Coverage   77.54%   77.54%           
=======================================
  Files          28       28           
  Lines        3758     3758           
=======================================
  Hits         2914     2914           
  Misses        686      686           
  Partials      158      158           
Flag Coverage Δ
post-merge ?
pre-merge 77.54% <100.00%> (?)

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

Files with missing lines Coverage Δ
cmd/operator/main.go 46.77% <100.00%> (ø)
internal/cli/cluster.go 81.32% <100.00%> (ø)
internal/cli/server.go 67.70% <100.00%> (ø)
internal/cli/setup.go 51.57% <100.00%> (ø)
internal/operator/controller.go 74.88% <ø> (ø)
pkg/metadata/crd_generator.go 80.39% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Agent-Hellboy Agent-Hellboy merged commit 1e6090c into main Dec 31, 2025
7 checks passed
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.

1 participant