Repository navigation
fix(helm): gate loopback MCP sidecars and preserve namespaces - #1711
Open
Wassim Chegham (manekinekko) wants to merge 2 commits into
Open
Wassim Chegham (manekinekko) wants to merge 2 commits into
Wassim Chegham (manekinekko) wants to merge 2 commits into
Conversation
Pin the verified MCPJungle stdio release by multi-architecture digest, bind its registry to pod loopback, and gate worker startup with in-container health probes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Generate global.namespace from required Bicep identity outputs, reject incomplete or incompatible worker identity namespaces, and keep install/bootstrap instructions namespace-consistent. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Test Results (Node.js 22)test: Run #625
🎉 All tests passed! |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Helm deployment-hardening changes.
No open issues 🎉
What changed in this PR
This follow-up to #1481 hardens Scope’s Helm deployment by restricting worker MCP gateways to loopback, gating initial worker startup on gateway health, and preserving Azure workload-identity namespaces.
Changes:
- Pins both MCP sidecars by digest and adds loopback startup/readiness probes.
- Generates
global.namespacefrom Bicep outputs and rejects incomplete worker identities or namespace mismatches before writing values. - Adds regression tests and aligns installation, bootstrap, and verification instructions for custom namespaces.
| File | Description |
|---|---|
scripts/helm-scope.test.ts |
Tests rendered sidecar probes, images, namespaces, and worker settings. |
scripts/generate-values-from-bicep.test.ts |
Tests namespace propagation, identity validation, and file preservation. |
scripts/generate-values-from-bicep.sh |
Emits the federated namespace and validates worker identity outputs. |
deploy/helm/scope/WORKERS.md |
Documents startup gating, loopback limits, and namespace-safe bootstrap. |
deploy/helm/scope/values.yaml |
Pins both MCP images and clarifies namespace and startup behavior. |
deploy/helm/scope/templates/workers/coder-acp-copilot/deployment.yaml |
Adds loopback binding and startup gating for the Copilot gateway. |
deploy/helm/scope/templates/workers/coder-acp-claude-code/deployment.yaml |
Adds equivalent binding and startup gating for the Claude Code gateway. |
deploy/helm/scope/templates/_helpers.tpl |
Gives image digests precedence over tags. |
deploy/helm/scope/SAMPLE-SCENARIO.md |
Makes sample port-forwarding namespace-aware. |
deploy/helm/scope/README.md |
Updates prerequisites, namespace guidance, and regression-check instructions. |
deploy/helm/scope/CONFIGURATION.md |
Explains digest overrides and federated-identity namespace requirements. |
Review effort: Balanced
Wassim Chegham (manekinekko)
marked this pull request as ready for review
November 25, 2026 14:57
Wassim Chegham (manekinekko)
requested a review
from Cedric Vidal (cedricvidal)
as a code owner
November 25, 2026 14:57
This branch has not been deployed
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.
Summary
Separate fix layer stacked on #1481, targeting
duffney-helm-chart-app-deploymentatd85ed7a687a953c594c6a6cbb70b1f862dce4b3a. The original PR branch is unchanged. Native stack registration is left to the coordinator.This covers only the three new re-review findings:
127.0.0.1:8080, using the verified0.4.7-stdiomulti-architecture image pinned to digestsha256:4eae32ecba23e2970413a320ae1f0457f9f7dac1ee39c2b3f34f48753e918e33. Keep stdio and remote MCP functionality; use the image's verifiedcurlfor in-container loopback probes.startupProbegating before either queue consumer starts. Readiness alone does not provide that gate. Use a direct MCPJungle process rather than a shell/grep pipeline.global.namespacefrom the backend federated-identity namespace, require complete worker identity outputs when present, and reject backend/worker namespace mismatches before writing values. Keep Helm, kubectl, and worker-bootstrap instructions consistent for custom namespaces.Worker-scoped identity and the absence of worker CSI mounts are preserved. Pre-existing findings, the migration-image follow-up, and trusted queue-processor versus untrusted executor isolation remain out of scope.
Demos
N/A: deployment configuration and tooling only; no Portal/CLI UI changes.
Before
N/A.
After
N/A.
Testing
Node 22.22.0, Helm 3.17.3 (checksum-verified temporary binary on
PATH), jq 1.7.1. No Azure credentials or resources were accessed.Passed: 47 tests, none skipped, including all 16 new chart/generator cases. New listener/startup and namespace regressions were also observed failing before the fixes.
Passed: strict type check of both new suites.
Passed: strict Helm lint, with both workers and a custom namespace; one chart linted, zero failures. Rendering tests inspect the actual generated startup/readiness exec-probe shapes, pinned images, loopback worker URLs, worker identity/volumes, and disabled-gateway behavior.
Passed: shell syntax and whitespace checks.
Passed: actual pinned amd64 image CLI and tool checks.
docker run --rm --platform linux/amd64 --network none --entrypoint /mcpjungle ghcr.io/mcpjungle/mcpjungle@sha256:4eae32ecba23e2970413a320ae1f0457f9f7dac1ee39c2b3f34f48753e918e33 start --help docker run --rm --platform linux/amd64 --network none --entrypoint /bin/sh ghcr.io/mcpjungle/mcpjungle@sha256:4eae32ecba23e2970413a320ae1f0457f9f7dac1ee39c2b3f34f48753e918e33 -ec 'command -v curl; command -v node; command -v npx; command -v uvx'Passed: local container functional smoke on arm64 and amd64. Started the pinned image with the exact chart flags and idle-timeout environment, confirmed loopback health/registry access and rejection of the container IP, then exercised the production
McpGatewayClient: purge, register a local stdio MCP server and a stateless HTTP MCP fixture, list both, invoke both echo tools through/mcp, and purge again. No ports were published, no credentials were mounted, and all containers exited afterward. Verified release source atmcpjungle/MCPJungle@974e2fabe4694d3b613d281e6e4e8d2fa3f6da74and namespace outputs at the companion Bicep revisioneaf8f75800d99f5f634ad7458caea91b475408c1.Limitations: no live AKS/kubelet lifecycle or Azure federation deployment was performed; startup gating follows the documented Kubernetes native-sidecar lifecycle and is checked in rendered manifests. External authenticated MCP services, SSE runtime smoke, and the full monorepo suite were not run.
Documentation and compatibility
Updated
deploy/helm/scope/README.md,CONFIGURATION.md,WORKERS.md,SAMPLE-SCENARIO.md, and values/template comments.global.namespace, Helm's release namespace, worker bootstrap's--namespace, and both federated subjects must agree. Pass the original values file to worker bootstrap so current chart defaults, including the pinned MCP image, are re-merged instead of freezing--reuse-values.image.digesttakes precedence over image tags. When changing the MCP release, update its digest as well as its tag and verify binding/probe capabilities.Checklist
up()/down()and keep it CosmosDB-compatible. (N/A.)NOTICE/NOTICE-REVIEW.txtwithpnpm noticeas needed. (N/A: no package dependency changes.)