Make SessionAffinity configurable via CRD field#3994
Conversation
PR #3986 hardcoded SessionAffinity: ClientIP on all operator-created Services. Review feedback identified this should be configurable: stateless MCP servers don't need stickiness and external load balancers may conflict. Add a sessionAffinity field (enum: ClientIP/None, default: ClientIP) to MCPServerSpec, MCPRemoteProxySpec, and VirtualMCPServerSpec. Wire the field through service creation and drift detection in all three controllers. Also fix a pre-existing bug in the MCPServer controller where the service update path did not copy Labels/Annotations, which could cause infinite reconciliation when those fields drifted. EmbeddingServer is intentionally excluded — embedding servers are stateless inference endpoints, not MCP protocol services. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3994 +/- ##
==========================================
+ Coverage 68.45% 68.49% +0.04%
==========================================
Files 437 437
Lines 44725 44751 +26
==========================================
+ Hits 30616 30652 +36
+ Misses 11724 11709 -15
- Partials 2385 2390 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@claude be a home and use a skill to fix the helm chart linter issue. |
|
Claude finished @JAORMX's task in 3m 32s —— View job Helm Chart Contribution Check Report
Contribution Check Results
Root Cause of CI FailureThe "Helm Charts / Lint and Test Helm Charts" CI failure was not a helm linter issue — it was a transient network error during the "Set up ko" step: The ko binary download failed mid-stream. This prevented the workflow from reaching the actual linting steps ( Locally verified: Running RecommendationThe CI failure is transient and unrelated to the PR changes. Simply re-run the "Helm Charts / Lint and Test Helm Charts" job in GitHub Actions — no code changes are needed. |
Summary
sessionAffinityfield (enum:ClientIP/None, default:ClientIP) toMCPServerSpec,MCPRemoteProxySpec, andVirtualMCPServerSpecFollow-up to #3986 which hardcoded
SessionAffinity: ClientIP. Review feedback identified this should be configurable: stateless MCP servers don't need stickiness and external load balancers may conflict with client-side affinity.EmbeddingServer is intentionally excluded — embedding servers are stateless inference endpoints, not MCP protocol services.
Test plan
task lintpasses (0 issues)task testpassessessionAffinity→ Service hasClientIPsessionAffinity: None→ Service hasNonesessionAffinityon existing resource → Service updates via drift detection🤖 Generated with Claude Code