Skip to content

OLS-3185: spec: create Service for ocp-mcp sidecar#1777

Open
onmete wants to merge 1 commit into
openshift:mainfrom
onmete:OLS-3185-spec-mcp-service
Open

OLS-3185: spec: create Service for ocp-mcp sidecar#1777
onmete wants to merge 1 commit into
openshift:mainfrom
onmete:OLS-3185-spec-mcp-service

Conversation

@onmete

@onmete onmete commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add rule 18a to what/app-server.md: when introspectionEnabled is true, create a Service named openshift-mcp-server targeting port 8080 on app server pods
  • This exposes the existing ocp-mcp sidecar to agentic sandbox pods via cluster-internal networking
  • Service is deleted when introspectionEnabled is set to false

Context

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

  • Spec review — rule is consistent with existing app-server patterns
  • No code changes — spec only

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added support for automatically creating an internal service for the MCP sidecar when introspection is enabled.
    • The service is removed when introspection is turned off.

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>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 2, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 2, 2026

Copy link
Copy Markdown

@onmete: This pull request references OLS-3185 which is a valid jira issue.

Details

In response to this:

Summary

  • Add rule 18a to what/app-server.md: when introspectionEnabled is true, create a Service named openshift-mcp-server targeting port 8080 on app server pods
  • This exposes the existing ocp-mcp sidecar to agentic sandbox pods via cluster-internal networking
  • Service is deleted when introspectionEnabled is set to false

Context

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

  • Spec review — rule is consistent with existing app-server patterns
  • No code changes — spec only

Made with Cursor

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.

@openshift-ci openshift-ci Bot requested review from blublinsky and xrajesh July 2, 2026 19:24
@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bparees for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This 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 openshift-mcp-server based on the spec.ols.introspectionEnabled setting.

Changes

Spec Documentation Update

Layer / File(s) Summary
MCP Server Service behavioral rule
.ai/spec/what/app-server.md
Documents that when spec.ols.introspectionEnabled is true, an openshift-mcp-server Service (in the operator namespace) must be created targeting port 8080 on app server pods to expose the MCP sidecar; when false, the Service must be deleted if it exists.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the spec-only change to create a Service for the ocp-mcp sidecar.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7ed4504 and 935d4c3.

📒 Files selected for processing (1)
  • .ai/spec/what/app-server.md

Comment on lines +30 to +32
### 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 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.

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown

@onmete: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants