kubeflow / kubeflow/docs-agent

bug(mcp-server): Placeholder <YOUR_NAMESPACE> in Milvus connection URI

Open
#91 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
42
Forks
111
Avg merge
6d 23m
Merged PRs (30d)
2

Description

Problem

kagent-feast-mcp/mcp-server/server.py lines 5-7 contain hardcoded placeholder values:

MILVUS_URI = "http://milvus.<YOUR_NAMESPACE>.svc.cluster.local:19530"
MILVUS_USER = "root"
MILVUS_PASSWORD = "Milvus"

Impact:

  1. <YOUR_NAMESPACE> is a literal string — the server will attempt to connect to milvus.<YOUR_NAMESPACE>.svc.cluster.local which doesn't resolve, causing a silent connection failure.
  2. Default credentials (root/Milvus) are hardcoded in source — these should come from a Secret reference.
  3. The URI cannot be changed per environment (local Kind vs OCI cluster) without rebuilding the Docker image.

Proposed Fix

Replace hardcoded values with environment variables:

import os

MILVUS_URI = os.getenv("MILVUS_URI", "http://milvus.docs-agent.svc.cluster.local:19530")
MILVUS_USER = os.getenv("MILVUS_USER", "root")
MILVUS_PASSWORD = os.getenv("MILVUS_PASSWORD", "Milvus")

This allows:

  • Kustomize overlays or Helm values to inject the correct URI per environment
  • K8s Secrets to provide credentials via envFrom in the Deployment manifest
  • Local development to override via .env or shell exports

Files

  • kagent-feast-mcp/mcp-server/server.py:5-7
  • kagent-feast-mcp/manifests/mcp-server/mcp-server.yaml (add env: block to Deployment)

Context

Discovered during local Kagent PoC validation — #59 (comment)

Note: @SanthoshToorpu noted that the namespace placeholder was intentional as a fill-in-the-blank pattern.

This issue proposes env vars as a better mechanism because they work across deployment targets without image rebuilds.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with kagent-feast-mcp/mcp-server/server.py lines 5-7 and inspect the Deployment in kagent-feast-mcp/manifests/mcp-server/mcp-server.yaml. Verify how environment-specific URI and credential values should be injected for local and cluster deployments. Done means the server no longer depends on the literal namespace placeholder and the Deployment exposes the required environment variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, python
Domain
backend, devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.