Skip to content

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

Closed as not planned

Description

@GunaPalanivel

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.

Activity

  1. GunaPalanivel commented on Mar 2, 2026

    @GunaPalanivel
    Author

    Makes sense as a placeholder, but it can't be patched per-environment
    through Kustomize overlays without rebuilding the image.

    Would this work?

    MILVUS_URI = os.getenv("MILVUS_URI", "http://milvus.<YOUR_NAMESPACE>:19530")
    

    Env var stays injectable, placeholder stays visible. Happy to PR it.

  2. Kunal-Somani commented on Mar 4, 2026

    @Kunal-Somani

    Hi team! I am an aspiring GSoC 2026 contributor and I would love to tackle this.

    I will replace the hardcoded credentials in server.py with os.getenv fallbacks and update the Kubernetes deployment manifest to inject them as environment variables, allowing for clean environment-specific overrides.

    /assign

  3. KUNDAN1334 commented on Mar 4, 2026

    @KUNDAN1334

    Hey @Kunal-Somani — thanks for the interest in this issue! Just to flag: this one was already assigned to me (@KUNDAN1334) and is currently on hold pending confirmation from @SanthoshToorpu on the intended namespace approach before we open a PR.

    Since the design discussion is still active with the mentors, it would be great if you could close your PR for now and wait for that alignment. Once the approach is confirmed, we can move forward cleanly.

    Appreciate the enthusiasm though — there are plenty of other open issues if you're looking to contribute! 🙂

  4. Kunal-Somani commented on Mar 4, 2026

    @Kunal-Somani

    Hi @KUNDAN1334. Since the issue had no official assignees, and the contributing guidelines state that "simply commenting doesn’t reserve the issue," I used the /assign bot which gave me the green light to proceed.

    However, I completely respect that you are already in an active design discussion with @SanthoshToorpu regarding the overall namespace architecture! I don't want to disrupt that workflow.

    I'll close my PR and unassign myself so you can proceed with the agreed-upon approach once Santhosh confirms it. Best of luck with the implementation!

  5. Kunal-Somani commented on Mar 4, 2026

    @Kunal-Somani

    /unassign

  6. KUNDAN1334 commented on Mar 4, 2026

    @KUNDAN1334

    Hey @Kunal-Somani — really appreciate you being so understanding about this! That was super gracious of you.

    You're right that the /assign bot gave you the green light, so there's no fault on your side at all. The hold was just because the design discussion with @SanthoshToorpu is still in progress and I didn't want us to build on an unconfirmed approach.

    Once the mentor confirms the direction and I open the PR, I'll make sure to credit the earlier work and discussion you contributed. Hope to collaborate on other issues soon! 🙏

  7. Kunal-Somani commented on Mar 4, 2026

    @Kunal-Somani

    Thanks so much for the kind words, @KUNDAN1334! I completely agree—nailing down the right architecture with Santhosh first is definitely the priority so no one has to rewrite things later.

    I really appreciate the offer for the credit, that is very generous of you! Looking forward to seeing the final implementation once the design is confirmed. See you around the issue tracker!

  8. Kunal-Somani commented on Mar 5, 2026

    @Kunal-Somani

    /assign

  9. Kunal-Somani commented on Mar 5, 2026

    @Kunal-Somani

    /unassign

  10. chasecadet commented on Nov 20, 2026

    @chasecadet
    Contributor

    Thank you for reporting this!

    We are closing pre-restructure issues targeting the legacy server/, server-https/, manifests/, kagent-feast-mcp/, or in-process SentenceTransformer prototype code. In #207, #210, #233, #240, and #249, kubeflow/docs-agent migrated to dedicated TEI (text-embeddings-inference), FastMCP (docs-agent-mcp/mcp-server/), shared modular KFP pipelines (docs-agent-mcp/pipelines/), and Helm charts (docs-agent-mcp/charts/).

    If you still observe an equivalent issue on the current main stack, please feel free to open a new issue using the current issue templates.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions