Skip to content

[FEATURE] Kubernetes workspace secrets from existing cluster Secrets #1756

Description

@edenreich

Summary

Each agent should be able to run on its own computer with its own secrets. With twelve Markdown agents on twelve Kubernetes workspaces, each pod daemon needs its own AGENTMAIL_API_KEY (or any other credential its tools and MCP servers read), and that secret should live in the cluster, not on the laptop that opens the thread.

A Kubernetes workspace in daemon.yaml has no way to read a Secret that already exists in the cluster:

field what it does fits
env inline non-secret values in the Orchestrator no, plain text in a Kubernetes object
gateway_env the CLI writes the laptop's provider keys into a Secret for the Gateway no, sourced from the laptop
forward_env sealed to the pod on every teleport, held in memory no, still originates on the laptop

Add secrets to a Kubernetes workspace entry, naming existing Secrets in the workspace namespace:

workspaces:
  - name: code-reviewer
    kind: kubernetes
    namespace: agents
    secrets:
      - code-reviewer-credentials

When the CLI creates a session's Orchestrator, it reads each Secret's keys and emits one spec.env item per key with valueFrom.secretKeyRef. The Orchestrator CRD's spec.env is already a full Kubernetes EnvVar passthrough, so no operator change is needed. The pod daemon gets the values in its environment, every worker it launches inherits them, and a ${VAR} in mcp.yaml expands from there. The value never passes through the laptop.

A daemon-kind workspace needs nothing new: its secrets are the environment that machine's infer daemon runs with. ~/.infer/auth.yaml is not part of it, since only the gateway and A2A supervisors read that file and ${VAR} in mcp.yaml expands from the process environment.

Acceptance Criteria

  • WorkspaceEntry accepts secrets (a list of Secret names) for kind: kubernetes.
  • The Orchestrator's spec.env carries a secretKeyRef item for every key of every listed Secret, next to the existing env items.
  • A missing Secret fails the teleport with an error naming the Secret and the namespace.
  • docs/daemon.md documents secrets beside env, gateway_env and forward_env, with the twelve-agents example.
  • A test covers the emitted spec.env items.

Activity

  1. added
    enhancement
    on Nov 8, 2026
  2. added theissue type on Nov 8, 2026
  3. moved this from Todo to In progress in 2026on Nov 8, 2026
  4. moved this from In progress to QA in 2026on Nov 8, 2026
  5. inference-gateway-releaser commented on Nov 8, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.248.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  6. moved this from QA to Done in 2026on Nov 8, 2026
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

    enhancementreleased

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions