Repository navigation
Closed
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiessource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/mediumValue Medium
Description
Problem Description
Deployment mcp-server in namespace devops crash-loops since the image is published (release 0.107.0). The pod refuses to start because no bearer token is set. Nothing in the repository creates that token, and nothing gives it to the clients.
Reproduction Steps
- Read the pod log of Deployment
mcp-serverin namespacedevops. - Read the key names (not the values) of Secret
devops/devops-cli. - Read
src/devops_cli/k8s/cluster_secrets.pyfor a row that holds an MCP token.
Expected vs Actual Behavior
Expected: devops k8s push-secrets writes a generated MCP token to the Secret that the server reads, and the same value to the Secret that the clients read. The pod then starts, and a client can call it.
Actual:
- The pod log says: "Refusing to start the streamable-http transport: no bearer token is set. Set mcp.token (DEVOPS_CLI_MCP_TOKEN, or
devops config set mcp.token)." (src/devops_cli/ai/mcp/remote.py, SECURITY.md "MCP Server on the Network"). - Secret
devops/devops-clihas no keyDEVOPS_CLI_MCP_TOKEN. CLUSTER_SECRETShas no row for an MCP token, sopush-secretscannot write it. The Deployment (feat(ai): integrate Jev 1.14 and agent configurations #4275) has nosecretKeyReffor it.- The clients read other credentials: the stage job reads
mcp.stage_token(DEVOPS_CLI_MCP_STAGE_TOKEN) and the implement job readsmcp.implement_token(DEVOPS_CLI_MCP_IMPLEMENT_TOKEN) insrc/devops_cli/roadmap/mcp.py. The server accepts one token only, so the three values must be equal. No row writes the two client keys, andconfigmap.example.yamlsets noroadmap.mcp.url. Both client switches (roadmap.stage.mcp,roadmap.implement.mcp) are off, so no client calls the server yet.
Environment Diagnostics
devops-cli 0.107.0, image ghcr.io/dan-petty/devops-cli/mcp-server, k8s stack devops.
Logs, Traces, or Terminal Output
CrashLoopBackOff, 62 restarts. The one log line is quoted above.
Proposed fix
- Add Secret
devops/mcp-servertoCLUSTER_SECRETS, with keyDEVOPS_CLI_MCP_TOKEN. The keyring entry ismcp.token, generated (urlsafe, 32 bytes) when it is missing, as forcrawl4ai. The row restarts Deploymentmcp-server. - Add the keys
DEVOPS_CLI_MCP_STAGE_TOKENandDEVOPS_CLI_MCP_IMPLEMENT_TOKENto thedevops-clirow. Both are optional, take the value ofmcp.token, and adopt from Secretdevops/mcp-server. - Wire the Deployment with a
secretKeyRefto the new Secret. - Set
roadmap.mcp.urlinconfigmap.example.yaml, with both switches left off. - Update
docs/ENV_VARS.md, SECURITY.md andk8s/README.md.
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiessource/agentFiled by an agenttype/bugType bug: the code does not do what it mustvalue/mediumValue Medium
Activity
dan-petty commentedon Nov 10, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(k8s)scope of the title gives the scope.The pod is in CrashLoopBackOff, but both client switches are off so no user is blocked today.The MCP server is broken and will block roadmap jobs once the client switches are enabled.Requires a new Secret row, two client keys, a secretKeyRef wire, a configmap entry, and three doc updates.Both add a service token to CLUSTER_SECRETS so push-secrets writes it, but for different services and different key names.devops-cli-service commentedon Nov 10, 2026
Released in v0.107.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.107.1
devops-cli-service commentedon Nov 10, 2026
Live since 2026-11-10 13:56 UTC
dan-petty commentedon Nov 11, 2026
Evidence from the cluster telemetry: this cause made the MCP server crash loop, and the fix stopped it. No new issue is necessary.
cli.mcproot spans in 24 hours with the statusExit(exit_code=1). Each lasted about 1.5 s. They came from versions 0.106.1 and 0.107.0.kube_pod_container_status_restarts_totalreached 12 on podmcp-server-6d774df98d-p4l94and 74 on podmcp-server-796f5f698f-7ff26.kube_pod_container_status_last_terminated_reasonwasErrorfor both. NoOOMKilledoccurred. The probes did not cause the restarts: the process stopped before it opened port 8001.{namespace="devops", service_name="mcp-server"} |= "Refusing to start"):Refusing to start the streamable-http transport: no bearer token is set. Set mcp.token (DEVOPS_CLI_MCP_TOKEN, or devops config set mcp.token).ArgoCdApplicationUnhealthyfired for thedevopsapplication (healthDegraded) during the full window. The application becameHealthyafter 13:12Z.mcp-server-685c696659-5kr4truns since 2026-11-11T01:25:53Z with 0 restarts.test_every_secret_key_that_a_manifest_reads_from_a_table_secret_is_a_table_entry(tests/invariants/test_k8s_manifests.py) fails if a manifest reads a key thatdevops k8s push-secretsdoes not write.