Skip to content

feature: Update MCP gateway for router tracing #1135

Closed

Description

@evaline-ju

Feature Description

Router tracing helpful for #619 is available in MCP gateway v0.5.1. The main change from 0.5.0 is the move to the operator-based install, which will likely require updates to installation process and resources separately deployed by Kagenti at this time.

Proposed Solution

Upgrade MCP gateway for next release

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Activity

  1. evaline-ju commented on Apr 2, 2026

    @evaline-ju
    ContributorAuthor

    On further analysis Kuadrant/mcp-gateway#678 (post 0.5.1) may be needed so that opentelemetry env vars aren't just removed via reconciliation

  2. changed the title [-]feature: Leverage MCP gateway 0.5.1[/-] [+]feature: Update MCP gateway for router tracing[/+] on Apr 2, 2026
  3. added
    blocked
    on Apr 2, 2026
  4. evaline-ju commented on Apr 2, 2026

    @evaline-ju
    ContributorAuthor

    This fix Kuadrant/mcp-gateway#704 (post 0.5.1) is a need before an upgrade

  5. evaline-ju commented on Apr 14, 2026

    @evaline-ju
    ContributorAuthor

    Logging some of the updates I made to test before roadblocks for whoever may pick up the next release, once unblocked

    Chart update for 0.5.1 in deployments/ansible/default_values.yaml

     mcpGateway:
        enabled: false
        namespace: mcp-system
        version: 0.5.1
        values:
          # See https://github.com/Kuadrant/mcp-gateway/blob/main/charts/mcp-gateway/values.yaml
          # for an example Helm values file for this chart.
          image:
            # Container image tag to use for the broker-router (deployed by controller)
            tag: v0.5.1
          imageController:
            # Container image tag to use for the controller
            tag: v0.5.1
          mcpGatewayExtension:
            gatewayRef:
              # Name of the listener on the Gateway to target (required in v0.5.1+)
              sectionName: mcp
    

    The reference grant and HTTP route should be removable rom the MCP gateway chart itself now, since the controller manages the broker-router deployment, HTTP routes, EnvoyFilter, via the CR, leaving the below for charts/kagenti/templates/mcp-gateway.yaml

    {{- if .Values.components.mcpGateway.enabled }}
    apiVersion: gateway.networking.k8s.io/v1
    kind: Gateway
    metadata:
      name: mcp-gateway
      namespace: "{{ .Values.mcpGateway.namespaces.gatewaySystem }}"
      annotations:
        networking.istio.io/service-type: ClusterIP
      labels:
        gateway.io/name: mcp-gateway
        istio: ingressgateway
        {{- include "kagenti.labels" . | nindent 4 }}
    spec:
      gatewayClassName: istio
      listeners:
        - name: mcp
          hostname: "{{ .Values.mcpGateway.hostname }}"
          port: 8080
          protocol: HTTP
          allowedRoutes:
            namespaces:
              from: All
        - name: mcps
          port: 8080
          protocol: HTTP
          hostname: '*.mcp.local'
          allowedRoutes:
            namespaces:
              from: All
    ---
    {{- if .Values.openshift }}
    apiVersion: route.openshift.io/v1
    kind: Route
    metadata:
      name: mcp-gateway
      namespace: "{{ .Values.mcpGateway.namespaces.gatewaySystem }}"
      labels:
        {{- include "kagenti.labels" . | nindent 4 }}
    spec:
      tls:
        insecureEdgeTerminationPolicy: Redirect
        termination: edge
      port:
        targetPort: mcp
      to:
        kind: Service
        name: mcp-gateway-istio
        weight: 100
      wildcardPolicy: None
    {{- end }}
    {{- end }}
    

    Once env vars are persist-able in the next MCP gateway chart release, certain otel env vars will have to be added to the broker-router deployment to see MCP gateway router traces. One way I was doing this while testing single broker-router images was the following in deployments/ansible/roles/kagenti_installer/tasks/main.yml after the Install/upgrade mcp-gateway chart section. This may not be the only strategy

    - name: Patch mcp-gateway-broker-router with OTEL env vars
      kubernetes.core.k8s:
        api_version: apps/v1
        kind: Deployment
        name: mcp-gateway-broker-router
        namespace: "{{ charts.mcpGateway.namespace | default('mcp-system') }}"
        state: patched
        definition:
          spec:
            template:
              spec:
                containers:
                  - name: mcp-broker-router
                    env:
                      - name: NAMESPACE
                        valueFrom:
                          fieldRef:
                            fieldPath: metadata.namespace
                      - name: OTEL_EXPORTER_OTLP_ENDPOINT
                        value: "http://otel-collector.kagenti-system.svc.cluster.local:8335"
                      - name: OTEL_EXPORTER_OTLP_INSECURE
                        value: "true"
                      - name: OTEL_EXPORTER_OTLP_PROTOCOL
                        value: "http/protobuf"
      when: charts.mcpGateway.enabled | default(false)
    
  6. removed
    blocked
    on Apr 21, 2026
  7. self-assigned this
    on Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions