Repository navigation
feat(registry/coder-labs/templates): add the Plain Sandbox (Kubernetes) template - #1232
Merged
Merged
Conversation
… Pod template with a host name firewall
…tes) and agent-sandbox (Kubernetes)
bpmct
marked this pull request as ready for review
November 3, 2026 20:14
bpmct
force-pushed
the
kubernetes-sandboxed
branch
from
November 3, 2026 20:15
c2b398e to
eecaeba
Compare
… Plain Sandbox (Kubernetes)
4 of 9 tasks
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.
Description
Adds a
coder-labstemplate that runs each workspace in a plain Kubernetes Pod, with a host name firewall. It needs no controller and no CRDs. It is the plain-Pods sibling of agent-sandbox (Kubernetes) (#1230).gvisor,kata-qemu, orkata-clhinruntimesto offer them in a "Kernel isolation" dropdown.build/Dockerfile, the policy gate instart-agent.sh, the scoped AI Gateway token, and the code-server, git-clone, and Claude Code setup.cluster/is a small Terraform configuration for the namespace and the RBAC.build/egress-proxy/Dockerfile, Squid 7 on Alpine, from the egress firewall in coder/dogfood. Users build it themselves.Startup on EKS, create to connected agent: 3 to 7 s from a prebuild, about 15 s cold or start after stop.
Type of Change
Template Information
Path:
registry/coder-labs/templates/kubernetes-sandboxedTesting & Validation
terraform test: 35 template runs and 3cluster/runs, with mock providers). CI runs.tftest.hclonly for modules, so these do not run in CI.prettier --check,terraform fmt), README validator passesrelease-20261102.0)Live test results
4.19.0-gvisor, GitHub 200, npm blocked, PTY worksexample.com,*.wikipedia.org, 443 and 80)Kata is not tested: the Kata nodes had no free CPU, so the Pod stayed Pending.
Decisions
hashicorp/kubernetes, notMastercard/restapi: the devrel prototype used restapi because it starts faster (claim build about 0.8 s). This uses the same provider as feat: add kubernetes-agent-sandbox template to coder-labs #1230, supportsuse_kubeconfig, and is easy to mock in tests. A claim build takes about 1.6 s.kubernetes_pod_v1waits until the Pod runs.127.0.0.1, so a lookup fails at once instead of timing out against a blocked server.runtime = "none"whenruntimesis set. Without it, picking gVisor with a preset claims a prebuild and fails with "Immutable parameter changed".coder_egress_portdefaults to 0, not null, socoder templates pushdoes not ask for it.-podafter an id that is new on each start, for the VPC CNI rule grouping issue (same as feat: add kubernetes-agent-sandbox template to coder-labs #1230).Review
A Claude (Fable) review found no blockers. Fixed: DNS lookups that hung, Squid
deny managerand IPv6 literals, a proxy Pod restart on a config change,distinct()on custom ports, README accuracy (the ConfigMap, "no Pod" changes on claim, Kata numbers, a DNS limit), a stale Dockerfile comment, and more tests. Not changed: thecustom_problemsform helper, and the explicit Pod timeouts (the provider default is 5 min).Related Issues
None
🤖 This PR was generated by Coder Agents on behalf of @bpmct.