Add CA bundle volume mount and validation for MCPRemoteProxy#4190
Open
majiayu000 wants to merge 3 commits intostacklok:mainfrom
Open
Add CA bundle volume mount and validation for MCPRemoteProxy#4190majiayu000 wants to merge 3 commits intostacklok:mainfrom
majiayu000 wants to merge 3 commits intostacklok:mainfrom
Conversation
MCPRemoteProxy was missing CA bundle support that already existed in MCPServer. This adds two features: 1. OIDC CA bundle volume mount in buildVolumesForProxy() so that custom CA certificates are available to the proxy container. 2. CA bundle ConfigMap validation in validateAndHandleConfigs() that checks the referenced ConfigMap exists and contains the expected key, setting appropriate status conditions. Signed-off-by: majiayu000 <1835304752@qq.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4190 +/- ##
==========================================
+ Coverage 68.85% 68.97% +0.12%
==========================================
Files 467 467
Lines 46983 47051 +68
==========================================
+ Hits 32349 32455 +106
- Misses 11974 11992 +18
+ Partials 2660 2604 -56 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
Are there any integration tests that we can add to this? |
Add WithCABundleRef builder helper and 4 integration test cases to verify the CA bundle ConfigMap reference validation end-to-end: valid ConfigMap with correct key, missing ConfigMap, wrong key in ConfigMap, and no CA bundle configured. Signed-off-by: majiayu000 <1835304752@qq.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
AddOIDCCABundleVolumes()call inbuildVolumesForProxy()to mount CA bundle ConfigMaps into the proxy containervalidateCABundleRef()method to the reconciler that validates the referenced ConfigMap exists and contains the expected key, mirroring the MCPServer patternConditionTypeMCPRemoteProxyCABundleRefValidatedcondition type for status reportingFixes #4113
Type of change
Changes
mcpremoteproxy_types.goConditionTypeMCPRemoteProxyCABundleRefValidatedconstantmcpremoteproxy_deployment.goAddOIDCCABundleVolumes()call inbuildVolumesForProxy()mcpremoteproxy_controller.govalidateCABundleRef(),updateCABundleStatusForProxy(),setCABundleRefConditionForProxy()methods and call fromvalidateAndHandleConfigs()mcpremoteproxy_deployment_test.gomcpremoteproxy_controller_test.goTestMCPRemoteProxyValidateCABundleRefwith 4 casesTest plan
go build ./...passestask lint-fixpasses with 0 issuesgo test ./cmd/thv-operator/controllers/...passesDoes this introduce a user-facing change?
MCPRemoteProxy now supports OIDC CA bundle ConfigMap references, matching the existing MCPServer behavior. Users can configure custom CA certificates for OIDC providers by setting
caBundlein their OIDC configuration.