-
Notifications
You must be signed in to change notification settings - Fork 170
Implement K8sReporter for VirtualMCPServer status updates #3251
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
base: issue-3147
Are you sure you want to change the base?
Conversation
Add K8sReporter implementation that enables vMCP runtime to report operational status to VirtualMCPServer.Status subresource when running in Kubernetes. This completes the StatusReporter abstraction with both CLI (NoOpReporter) and Kubernetes modes. Closes: #3149
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.
Large PR Detected
This PR exceeds 1000 lines of changes and requires justification before it can be reviewed.
How to unblock this PR:
Add a section to your PR description with the following format:
## Large PR Justification
[Explain why this PR must be large, such as:]
- Generated code that cannot be split
- Large refactoring that must be atomic
- Multiple related changes that would break if separated
- Migration or data transformationAlternative:
Consider splitting this PR into smaller, focused changes (< 1000 lines each) for easier review and reduced risk.
See our Contributing Guidelines for more details.
This review will be automatically dismissed once you add the justification section.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## issue-3147 #3251 +/- ##
==============================================
+ Coverage 56.96% 56.97% +0.01%
==============================================
Files 352 354 +2
Lines 34978 35023 +45
==============================================
+ Hits 19924 19954 +30
- Misses 13396 13410 +14
- Partials 1658 1659 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR implements K8sReporter to enable vMCP runtime to report operational status to VirtualMCPServer.Status subresource when running in Kubernetes. The implementation completes the StatusReporter abstraction pattern with automatic detection between CLI (NoOpReporter) and Kubernetes (K8sReporter) modes based on environment variables.
Changes:
- Added K8sReporter implementation with periodic status reporting to Kubernetes API
- Created factory pattern for automatic reporter selection based on environment
- Added comprehensive unit tests and E2E tests for status reporting functionality
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/vmcp/status/k8s_reporter.go | Core K8sReporter implementation with status update and lifecycle management |
| pkg/vmcp/status/k8s_reporter_test.go | Unit tests for K8sReporter functionality |
| pkg/vmcp/status/factory.go | Factory pattern for environment-based reporter selection |
| pkg/vmcp/status/factory_test.go | Unit tests for factory logic and environment detection |
| cmd/vmcp/app/commands.go | Integration of factory-based reporter creation in serve command |
| cmd/thv-operator/controllers/virtualmcpserver_deployment.go | RBAC permissions for status subresource updates |
| test/e2e/thv-operator/virtualmcp/virtualmcp_status_reporting_test.go | End-to-end tests validating status reporting in Kubernetes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Large PR justification has been provided. Thank you!
|
✅ Large PR justification has been provided. The size review has been dismissed and this PR can now proceed with normal review. |
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.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add K8sReporter implementation that enables vMCP runtime to report operational status to VirtualMCPServer.Status subresource when running in Kubernetes. This completes the StatusReporter abstraction with both CLI (NoOpReporter) and Kubernetes modes.
Large PR Justification
This is an atomic PR, including test coverage. It cannot be split because it provides a complete and independent functionality.
Closes: #3149