Draft: MCPRemoteProxy: Add remaining configuration validations#4037
Open
ChrisJBurns wants to merge 1 commit intomainfrom
Open
Draft: MCPRemoteProxy: Add remaining configuration validations#4037ChrisJBurns wants to merge 1 commit intomainfrom
ChrisJBurns wants to merge 1 commit intomainfrom
Conversation
Add four new validations to the MCPRemoteProxy controller, each surfacing errors via Kubernetes Events and Status Conditions: - Remote URL format validation (scheme and host) - JWKS URL scheme validation (must use HTTPS) - Cedar authorization policy syntax validation - ConfigMap/Secret reference existence checks Includes unit tests for all validation functions, reconciler condition tests, and integration tests for both conditions and event emission. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4037 +/- ##
==========================================
+ Coverage 68.66% 68.71% +0.04%
==========================================
Files 445 447 +2
Lines 45343 45456 +113
==========================================
+ Hits 31136 31236 +100
- Misses 11802 11812 +10
- Partials 2405 2408 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Extends #4024 with the four remaining MCPRemoteProxy configuration validations, each surfacing errors via Kubernetes Events and Status Conditions:
ftp://, empty host)All validations follow the foundation pattern from #4024: fail-fast in
validateSpec(), setConfigurationValid=Falsecondition with a specific reason, emit a Warning event, and move the proxy toFailedphase.No network calls are made — URL validations are format/scheme checks only; ConfigMap/Secret checks are in-cluster reads.
Test plan
ValidateCedarPolicies(6 cases)ValidateRemoteURL(6 cases) andValidateJWKSURL(5 cases)TestValidateSpecConfigurationConditions)go build ./cmd/thv-operator/...passesgolangci-lintpasses on changed packages🤖 Generated with Claude Code