Repository navigation
feat(workspaces): give a kubernetes workspace its own Secrets - #1758
Merged
Merged
Conversation
A kubernetes workspace accepts `secrets`, naming Secrets in its namespace. When a session's Orchestrator is created, every key of each becomes a `spec.env` item with a `secretKeyRef`, so the pod daemon, its workers and the `${VAR}`s of its mcp.yaml see them while the values stay in the cluster and never pass through this machine.
Each agent on its own workspace now holds its own credentials, such as an AgentMail key. A missing Secret fails the teleport before anything is created, and `secrets` on any other kind fails validation.
Closes #1756
Closed
4 tasks
Contributor
|
🎉 This PR is included in version 0.248.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1756
Summary
Each agent should run on its own computer with its own secrets. With twelve agents on twelve Kubernetes workspaces, each pod daemon needs its own
AGENTMAIL_API_KEY, and that key should live in the cluster, not on the machine that opens the thread.None of the existing fields fit:
envis plain text in the Orchestrator.gateway_envwrites this machine's provider keys into the Gateway's Secret.forward_envseals this machine's values to the pod on every teleport.A Kubernetes workspace now names existing Secrets in its namespace:
Changes
config/daemon.go:WorkspaceEntrygainssecrets. Setting it on any kind butkubernetesfails validation, likegateway_envdoes.internal/agent/infrastructure/kubernetes/workspace.go:createreads each listed Secret and passes onesecretKeyRefenv item per key, sorted, to the Orchestrator. They come after the daemon's own variables and the entry'senv.spec.envis already a fullEnvVarpassthrough, so the operator needs no change.secretsbullet indocs/daemon.mdwith a per-agent example, and the field in the configuration reference.A daemon-kind workspace needs nothing new. Its secrets are the environment its
infer daemonruns with.Verification
createcovers no secrets, every key of two Secrets in order with no value in the Orchestrator, and a missing Secret creating nothing.secretson a daemon kind.go test -race ./config/ ./internal/agent/...passes,go test ./...passes, and so do the pre-commit hook and lint.Docs follow-up: inference-gateway/docs#1128.