OLS-3185: spec: create Service for ocp-mcp sidecar#1777
Conversation
When introspectionEnabled is true, create a Service named openshift-mcp-server targeting the MCP sidecar port (8080) on app server pods. This exposes the sidecar to agentic sandbox pods in the cluster. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@onmete: This pull request references OLS-3185 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughThis PR adds a documentation-only change to the app server specification, describing a new behavioral rule for conditionally creating or deleting a Kubernetes Service named ChangesSpec Documentation Update
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.ai/spec/what/app-server.md:
- Around line 30-32: The MCP Server Service rule is ambiguous because both the
RHOKP sidecar and the MCP sidecar are described as using 8080, so the Service
target in the app-server spec needs to be clarified. Update the spec in the MCP
Server Service section to assign a distinct port or port name for the ocp-mcp
sidecar, or explicitly document how the `openshift-mcp-server` Service should
select the correct listener; keep the language aligned with
`spec.ols.introspectionEnabled` and the existing sidecar port definitions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8233dc67-99e7-4521-885a-6590fb8bb5f8
📒 Files selected for processing (1)
.ai/spec/what/app-server.md
| ### MCP Server Service | ||
| 18a. When `spec.ols.introspectionEnabled` is true, the operator MUST create a `Service` named `openshift-mcp-server` in the operator namespace that selects the app server pods and targets port 8080 (the MCP sidecar port). This Service exposes the ocp-mcp sidecar to other pods in the cluster (e.g., agentic sandbox pods). When `introspectionEnabled` is false, the Service MUST be deleted if it exists. | ||
|
|
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift
Clarify the port layout before standardizing this Service.
This rule conflicts with the existing spec: the RHOKP sidecar is documented as always serving on localhost:8080, and the MCP sidecar is also documented on port 8080. Those containers share a pod network, so this Service can’t unambiguously target the MCP sidecar as written.
Please update the spec to use a distinct port/port name or explain how the two 8080 listeners coexist.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.ai/spec/what/app-server.md around lines 30 - 32, The MCP Server Service
rule is ambiguous because both the RHOKP sidecar and the MCP sidecar are
described as using 8080, so the Service target in the app-server spec needs to
be clarified. Update the spec in the MCP Server Service section to assign a
distinct port or port name for the ocp-mcp sidecar, or explicitly document how
the `openshift-mcp-server` Service should select the correct listener; keep the
language aligned with `spec.ols.introspectionEnabled` and the existing sidecar
port definitions.
|
@onmete: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
what/app-server.md: whenintrospectionEnabledis true, create aServicenamedopenshift-mcp-servertargeting port 8080 on app server podsintrospectionEnabledis set to falseContext
The agentic operator needs to connect sandbox pods to the ocp-mcp server. Today, the sidecar is only accessible via localhost within the app server pod. This Service makes it reachable cluster-wide.
Companion PRs:
Test plan
Made with Cursor
Summary by CodeRabbit