Skip to content

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Sep 22, 2025

Extends the MCPRegistry CRD with a new enforce flag. This flag defaults to false, but when set to true, the MCP server controller will only reconcile serves that are present in one of the enforcing registries.

Fixes: #1976

@jhrozek jhrozek force-pushed the thv-registry-enforce branch from d5cf1d3 to 47fbcb5 Compare September 22, 2025 15:43
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

❌ Patch coverage is 73.05389% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.90%. Comparing base (8b9ac40) to head (c6c0efb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...d/thv-operator/controllers/mcpserver_controller.go 34.09% 28 Missing and 1 partial ⚠️
cmd/thv-operator/main.go 0.00% 9 Missing ⚠️
...md/thv-operator/pkg/validation/image_validation.go 93.85% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1997      +/-   ##
==========================================
+ Coverage   47.76%   47.90%   +0.14%     
==========================================
  Files         232      233       +1     
  Lines       29007    29170     +163     
==========================================
+ Hits        13856    13975     +119     
- Misses      14126    14166      +40     
- Partials     1025     1029       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@dmartinol dmartinol left a comment

Choose a reason for hiding this comment

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

thank you for submitting these changes!
some minor comments that would not prevent the approval, and a couple of general comments that I'd like to address before.

  • What happens if the MCPServer is annotated to match a given registry? Shouldn't we restrict the validation to run only againts that registry?
  • Generally speaking, the term ImageValidation seems to minimize the feature, because we could extend it to validate the annotations (see ^) and also verify that the associated server exists, is in Active status and also secure and so on (we could add more annotations for that).

Apart from these nits, that can be addressed later, looks good!

@JAORMX JAORMX requested a review from Copilot September 23, 2025 12:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jhrozek jhrozek force-pushed the thv-registry-enforce branch from 47fbcb5 to 8814705 Compare September 24, 2025 03:57
@jhrozek
Copy link
Contributor Author

jhrozek commented Sep 24, 2025

Thank you for the review @dmartinol I implemented the suggestions as individual patches. I must say that because this week is a "conference" week for us I haven't had that much time testing it - I'll do that in a couple of hours in the meantime I wanted the CI to have a go.

@jhrozek jhrozek requested a review from Copilot September 24, 2025 03:59
Copy link
Contributor

@Copilot Copilot AI left a 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 11 out of 11 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

dmartinol
dmartinol previously approved these changes Sep 24, 2025
@jhrozek jhrozek force-pushed the thv-registry-enforce branch from deed7fb to c6c0efb Compare September 24, 2025 14:39
@jhrozek jhrozek merged commit 836d2e7 into main Sep 24, 2025
36 checks passed
@jhrozek jhrozek deleted the thv-registry-enforce branch September 24, 2025 15:09
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.

[Kubernetes MCPRegistry]: Server Registration Enforcement

2 participants