Skip to content

feat(gateway): extra env vars for the OpenAPI-to-MCP sidecar and bump it to 1.0.9 - #406

Merged
LiteSun merged 1 commit into
mainfrom
feat/openapi-to-mcp-extra-env
Oct 20, 2026
Merged

LiteSun merged 1 commit into
mainfrom
feat/openapi-to-mcp-extra-env

Conversation

@LiteSun

@LiteSun LiteSun commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The OpenAPI-to-MCP service is configured through environment variables (TIMEOUT, CACHE_ENABLED, CACHE_TTL, ...), but the gateway chart only sets SSE_PORT on the sidecar container and offers no way to add others, so Helm deployments cannot change the backend request timeout at all (the docs already note that the cache variables are not exposed for Helm). With api7/OpenAPI2MCP#60 the TIMEOUT variable is now honored by the service, so the chart needs an entry for it.

Changes

  • charts/gateway/values.yaml: new openapiToMcp.extraEnvVars (default [], same shape as apisix.extraEnvVars); openapiToMcp.image.tag 1.0.6 → 1.0.9.
  • charts/gateway/templates/_pod.tpl: render openapiToMcp.extraEnvVars after SSE_PORT through apisix.tplvalues.render. The key may be absent (--reuse-values from an older release) and then renders nothing.
  • charts/gateway/Chart.yaml: chart version 3.10.16 → 3.10.17.
  • charts/gateway/README.md: regenerated with helm-docs.
openapiToMcp:
  enabled: true
  extraEnvVars:
    - name: TIMEOUT
      value: "60000"

Verification

  • helm lint charts/gateway passes.
  • helm template with the sidecar disabled renders no sidecar container, as before.
  • With the sidecar enabled and two extraEnvVars (a literal and a configMapKeyRef), both appear after SSE_PORT in the sidecar's env; with the key unset the sidecar env is unchanged.

References

Summary by CodeRabbit

  • New Features
    • Added support for configuring additional environment variables for the OpenAPI-to-MCP sidecar. SSE_PORT remains managed by the sidecar’s port setting.
  • Updates
    • Updated the sidecar’s default image tag to 1.0.9 and the gateway chart version to 3.10.17.
  • Documentation
    • Documented the additional environment variable settings and provided examples.

… it to 1.0.9

The OpenAPI-to-MCP service is configured through environment variables
(`TIMEOUT`, `CACHE_ENABLED`, `CACHE_TTL`, ...), but the chart only ever
set `SSE_PORT` on the sidecar container and gave no way to add more, so
Helm deployments could not change the backend request timeout at all.

Add `openapiToMcp.extraEnvVars`, rendered after `SSE_PORT` the same way
`apisix.extraEnvVars` is, and bump the sidecar image to 1.0.9, the first
release in which `TIMEOUT` is actually honored (api7/OpenAPI2MCP#60).
Chart version 3.10.16 -> 3.10.17.
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: eb1f8104-9fbe-4279-b897-f730944c5e66
📥 Commits

Reviewing files that changed from the base of the PR and between 2bd4cae and 65ba894.

📒 Files selected for processing: 4
  • charts/gateway/Chart.yaml
  • charts/gateway/README.md
  • charts/gateway/templates/_pod.tpl
  • charts/gateway/values.yaml
📝 Walkthrough

The gateway chart adds an openapiToMcp.extraEnvVars setting and renders its values into the sidecar environment. The sidecar image tag changes to 1.0.9, and the chart version changes to 3.10.17.

Changes: OpenAPI-to-MCP sidecar

Layer / File(s) Summary
Sidecar configuration and chart release
charts/gateway/values.yaml, charts/gateway/templates/_pod.tpl, charts/gateway/README.md, charts/gateway/Chart.yaml
The chart adds extraEnvVars for the sidecar and renders configured values into its environment. The setting and SSE_PORT behavior are documented. The image tag changes to 1.0.9, and the chart version changes to 3.10.17.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: alinsran, jarvis9443

Merge Risk: ⚪ Minimal · up to 65ba8

Deployments can now configure additional sidecar environment variables; no concrete regression is evident in the supplied change context.

Pre-merge checks: Passed 5 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
E2e Test Quality Review Warning Blocking: the PR adds no E2E test for the new openapiToMcp.extraEnvVars flow. The changed-file diff contains only chart metadata, documentation, values, and the pod template. The existing gateway CI… Add an independent E2E test or CI scenario that enables openapiToMcp, configures extraEnvVars with a literal and a configMapKeyRef, installs the chart, and asserts the running sidecar environment. Exercise a real gateway-to-OpenAPI-to…
Passed 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 clearly and concisely describes the main changes: adding extra environment variables for the OpenAPI-to-MCP sidecar and updating its image to version 1.0.9.
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.
Security Check Passed PASS. The diff only adds optional environment entries to the OpenAPI-to-MCP sidecar, updates its image tag, and increments chart documentation/version. No issues found in Category 1 (logs/responses), …
Full details: Security Check

Explanation

PASS. The diff only adds optional environment entries to the OpenAPI-to-MCP sidecar, updates its image tag, and increments chart documentation/version. No issues found in Category 1 (logs/responses), Category 2 (plaintext database secrets), Category 3 (authorization), Category 4 (ownership validation), Category 5 (TLS), Category 6 (shared-resource isolation), or Category 7 (secret-reference resolution). The new template does not log or persist values, add endpoints, change permissions, alter TLS, or introduce $env:///$secret:// handling.

Full details: E2e Test Quality Review

Explanation

Blocking: the PR adds no E2E test for the new openapiToMcp.extraEnvVars flow. The changed-file diff contains only chart metadata, documentation, values, and the pod template. The existing gateway CI job runs ct install with the sidecar disabled by default and sets only apisix.extraEnvVars, so it does not verify the new sidecar environment or the OpenAPI-to-MCP request flow. No test or scenario covers literal values, valueFrom references, omitted values, or the configured timeout in a running service.

Resolution

Add an independent E2E test or CI scenario that enables openapiToMcp, configures extraEnvVars with a literal and a configMapKeyRef, installs the chart, and asserts the running sidecar environment. Exercise a real gateway-to-OpenAPI-to-MCP request against a test backend so the configured TIMEOUT affects the business flow. Also verify the disabled-sidecar and omitted-key cases without relying on test order.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@LiteSun
LiteSun merged commit de68860 into main Oct 20, 2026
4 checks passed
@LiteSun
LiteSun deleted the feat/openapi-to-mcp-extra-env branch October 20, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants