Skip to content

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Dec 2, 2025

We want to add a podTemplateSpec for vMCP, but in order to avoid code duplication, it would be nice to reuse as much as possible from MCPServer's podTemplateBuilder.

This PR makes the builder reusable and covers its usage with integration tests to make sure we don't regress.

Large PR Justification

Most of the size in the PR is adding integration tests. I /could/ add them separately but I don't see the point. Having them in the same PR ensures the PR doesn't introduce regressions.

… use it Extract shared PodTemplateSpec utilities to controllerutil Update MCPServer controller to use the shared PodTemplateSpecBuilder from controllerutil instead of the MCPServer-specific builder.
Add integration tests for MCPServer PodTemplateSpec functionality: - Resource limits (CPU/memory) applied to deployment containers - SecurityContext settings (runAsNonRoot, readOnlyRootFilesystem) - PodTemplateSpec updates trigger deployment reconciliation - Valid condition set to True for valid PodTemplateSpec JSON
@github-actions github-actions bot added the size/XL Extra large PR: 1000+ lines changed label Dec 2, 2025
Copy link
Contributor

@github-actions github-actions bot left a 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 transformation

Alternative:

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
Copy link

codecov bot commented Dec 2, 2025

Codecov Report

❌ Patch coverage is 96.34146% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.62%. Comparing base (efe86fa) to head (87343b1).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...ator/pkg/controllerutil/podtemplatespec_builder.go 97.46% 1 Missing and 1 partial ⚠️
...d/thv-operator/controllers/mcpserver_controller.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@ ## main #2840 +/- ## ======================================= Coverage 56.61% 56.62% ======================================= Files 320 320 Lines 30932 30936 +4 ======================================= + Hits 17513 17517 +4  Misses 11914 11914 Partials 1505 1505 

☔ 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
Contributor

@tgrunnagle tgrunnagle left a comment

Choose a reason for hiding this comment

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

LGTM!

@jhrozek jhrozek dismissed github-actions[bot]’s stale review December 3, 2025 11:01

I've provided the justification

@jhrozek jhrozek merged commit f57d84a into main Dec 3, 2025
34 checks passed
@jhrozek jhrozek deleted the split_out_podtemplate branch December 3, 2025 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Extra large PR: 1000+ lines changed

4 participants