Repository navigation
feat(deploy): Helm chart with the Kubernetes sandbox - #783
Closed
thecorporatetractor wants to merge 2 commits into
Closed
thecorporatetractor wants to merge 2 commits into
thecorporatetractor wants to merge 2 commits into
Conversation
This was referenced Dec 1, 2026
ARTEX_RUNNER_BACKEND=kubernetes runs each task in a worker pod behind its own egress-proxy pod, created through the Kubernetes API with no container runtime socket. Per-task NetworkPolicies are applied before the pods and removed after them; the runner waits until they are in effect before the first command, runs commands through pods/exec under env -i and artex-exec-wrap, and re-adopts task pods after a restart. Unit tests run against a fake API server; a live test (TestKubeSandboxE2E) drives a deployed runner.
thecorporatetractor
force-pushed
the
feat/k8s-helm-chart
branch
from
December 1, 2026 20:31
f0c3d6d to
8f5d800
Compare
Contributor
Author
deploy/helm/artex deploys the panel, PostgreSQL and artex-runner with a namespace-scoped Role, default-deny NetworkPolicies and a values schema. A volume-permissions init container restores root ownership of /app/data and /app/keys, fixing the isolation self-test failure on world-writable volumes (BaaRai#620). scripts/k3d-e2e.sh and the kubernetes CI job test it live on k3d.
thecorporatetractor
force-pushed
the
feat/k8s-helm-chart
branch
from
December 1, 2026 21:11
8f5d800 to
f8d6a2b
Compare
This was referenced Dec 1, 2026
Owner
|
Thanks for the work. This PR is 4,693 lines across 21 files, above the review threshold we can apply line by line (2,500 lines or 15 files). I am parking it for the current wave rather than closing it: the PR stays open and the work is kept. To get it reviewed, please split it by subsystem into PRs under that threshold. For this one, a natural split is: Helm chart, values and docs, tests. If the feature is already on the roadmap, link the tracking issue and we will pick it up there. |
Contributor
Author
|
Closing in favour of the smaller PRs listed in #781, which land one at a time. The branch stays on the fork as the reference for the full feature. |
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.
Problem
The Kubernetes backend from #780 needs a deployment that wires the runner, its RBAC and the NetworkPolicies correctly. Running the panel on Kubernetes by hand also fails the isolation self-test on world-writable volumes (
Bash can create files in /app/data), which is the security-context question in #620.Change
deploy/helm/artex: panel, PostgreSQL andartex-runnerwithARTEX_RUNNER_BACKEND=kubernetes, a values schema, an optional Ingress and ahelm testhook.volume-permissionsinit container restores root ownership of/app/dataand/app/keys, so the panel's isolation self-test passes on volumes that are world-writable after provisioning (Deploying on Kubernetes Best Practises #620).ReadWriteOncedata volume, task pods are pinned to the runner's node.ReadWriteManylets them run on any node.scripts/k3d-e2e.shbuilds the images, creates a k3d cluster, installs the chart and runsTestKubeSandboxE2E(RUNNER_ONLY=1skips the panel).kubernetesCI job:helm lint --strictandscripts/k3d-e2e.shin runner-only mode on k3d (pinned k3d binary with a checksum). It runs only when sandbox, deploy, runner or Dockerfile paths change.Depends on
Depends on #780. This branch includes its commit until #780 merges. Review only the last commit,
feat(deploy): Helm chart with the Kubernetes sandbox.Tests
Run on this branch, rebased on current
main:go build ./...,go vet ./..., gofmt clean, cross-builds for darwin/arm64, darwin/amd64 and windows/amd64: OK.helm lint --strict deploy/helm/artex: 0 charts failed.go test ./sandbox: OK. Includes 10 chart render tests (TestHelmChart*): pod security baseline, runner env, image overrides, secrets wiring, minimal RBAC, network policies, access-mode pinning, modes and options, schema rejections, lint.shellcheck -S warning scripts/k3d-e2e.sh: clean.RUNNER_ONLY=1 ARTEX_E2E_INTERNET=1 scripts/k3d-e2e.sh(the CI job):TestKubeSandboxE2Epassed in 36 s, all 9 subtests (identity and hardening, workspace, exit codes/timeout/truncation, cluster objects, network isolation, in-scope egress through the proxy, kill, runner restart recovery, delete).ARTEX_E2E_INTERNET=1): chart installed with--wait,helm testSucceeded, the panel log shows[isolation] self-test passed(the Deploying on Kubernetes Best Practises #620 failure is gone), thenTestKubeSandboxE2Epassed in 33 s, all 9 subtests. The cluster was deleted afterwards.Notes
sandbox.mode=off.Part of #781.