Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions charts/gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ The command removes all the Kubernetes components associated with the chart and
| nginx.workerProcesses | string | `"auto"` | |
| nginx.workerRlimitNofile | string | `"20480"` | |
| nginx.workerShutdownTimeout | string | `"240s"` | |
| openapiToMcp.enabled | bool | `false` | Enable or disable the OpenAPI-to-MCP sidecar. Required when using the `openapi-to-mcp` or `mcp-tools-acl` plugins. The container runs alongside the gateway in the same pod and is reached on 127.0.0.1. |
| openapiToMcp.image.pullPolicy | string | `"IfNotPresent"` | OpenAPI-to-MCP image pull policy |
| openapiToMcp.image.repository | string | `"api7/openapi-to-mcp"` | OpenAPI-to-MCP image repository |
| openapiToMcp.image.tag | string | `"0.0.1-beta"` | OpenAPI-to-MCP image tag |
| openapiToMcp.port | int | `3000` | Port that the sidecar listens on. Must match the `port` configured under `plugin_attr.openapi-to-mcp` in the gateway config (defaults to 3000). |
| openapiToMcp.resources | object | `{}` | Resources for the OpenAPI-to-MCP sidecar container. |
| pluginAttrs | object | `{}` | Set APISIX plugin attributes, see [config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L376) for more details |
| rbac.create | bool | `false` | |
| serviceAccount.annotations | object | `{}` | |
Expand Down
37 changes: 37 additions & 0 deletions charts/gateway/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,43 @@ spec:
port: http
scheme: HTTP
{{- end }}
{{- if .Values.openapiToMcp.enabled }}
{{- $mcpAttr := (index .Values.pluginAttrs "openapi-to-mcp" | default dict) -}}
{{- $pluginMcpPort := (index $mcpAttr "port" | default 3000 | int) -}}
{{- if ne $pluginMcpPort (int .Values.openapiToMcp.port) -}}
{{- fail (printf "openapiToMcp.port (%v) must match pluginAttrs.openapi-to-mcp.port (%v; default 3000)" .Values.openapiToMcp.port $pluginMcpPort) -}}
{{- end }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- name: openapi-to-mcp
image: {{ .Values.openapiToMcp.image.repository }}:{{ .Values.openapiToMcp.image.tag }}
imagePullPolicy: {{ .Values.openapiToMcp.image.pullPolicy }}
env:
- name: SSE_PORT
value: {{ .Values.openapiToMcp.port | quote }}
ports:
- containerPort: {{ .Values.openapiToMcp.port }}
name: http
protocol: TCP
readinessProbe:
httpGet:
path: /health
port: {{ .Values.openapiToMcp.port }}
failureThreshold: 6
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /health
port: {{ .Values.openapiToMcp.port }}
failureThreshold: 6
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 3
resources:
{{- toYaml .Values.openapiToMcp.resources | nindent 8 }}
{{- end }}
Comment thread
jarvis9443 marked this conversation as resolved.
{{- if .Values.apisix.hostNetwork }}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
Expand Down
18 changes: 18 additions & 0 deletions charts/gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,24 @@ soapProxy:
# -- SOAP proxy image pull policy
pullPolicy: IfNotPresent

openapiToMcp:
# -- Enable or disable the OpenAPI-to-MCP sidecar. Required when using the
# `openapi-to-mcp` or `mcp-tools-acl` plugins. The container runs alongside
# the gateway in the same pod and is reached on 127.0.0.1.
enabled: false
image:
# -- OpenAPI-to-MCP image repository
repository: api7/openapi-to-mcp
# -- OpenAPI-to-MCP image tag
tag: 0.0.1-beta
# -- OpenAPI-to-MCP image pull policy
pullPolicy: IfNotPresent
# -- Port that the sidecar listens on. Must match the `port` configured under
# `plugin_attr.openapi-to-mcp` in the gateway config (defaults to 3000).
port: 3000
# -- Resources for the OpenAPI-to-MCP sidecar container.
resources: {}

control:
# -- Enable Control API
enabled: true
Expand Down
Loading