Add sandbox values so deployers can choose the build confinement mode - #46
Open
tylerpotts wants to merge 1 commit into
Open
Add sandbox values so deployers can choose the build confinement mode#46tylerpotts wants to merge 1 commit into
tylerpotts wants to merge 1 commit into
Conversation
Nebi confines untrusted environment builds with Landlock and picks its own default: strict in team mode, off in local mode. There was no way to override that from the chart, so a cluster whose kernel cannot confine had no path to a working build other than rolling back the image. Each key is emitted only when set, so the rendered output is unchanged for deployers who leave the block alone.
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.
Reference Issues or PRs
Supports nebari-dev/nebi#495, which adds Landlock confinement for untrusted environment builds (part of nebari-dev/nebi#445).
What does this implement/fix?
Summary
Nebi confines untrusted environment builds with Landlock and picks its own default:
strictin team mode,offin local/desktop mode. The chart had no way to override that, and no genericextraEnvescape hatch either, so a cluster whose kernel cannot establish the sandbox had no route to a working build short of rolling the image back or hand-patching the Deployment (which ArgoCDselfHealthen reverts).This adds a
sandboxblock wiring the three environment variables nebi already reads:Default behavior is unchanged
Each key is emitted only when set, so a deployer who leaves the block alone gets no new environment variables and nebi keeps applying its own defaults. I verified the rendered output is byte-identical to
mainfor a default install:With overrides:
Why
modematters in practiceLandlock's filesystem confinement needs Linux 5.13+, and the
referright that package managers rely on to move a staged download into their cache needs 5.19+. On an older kernel,strictfails the build by design.permissiveis the documented way to keep such a cluster running while it is upgraded, and until now the chart could not express it.Note on
allowedPortsAn empty list here means "leave nebi's default in place", not "deny all TCP". Nebi does treat an explicitly empty allowlist as deny-all, but that cannot be expressed through an environment variable: viper reads an empty environment variable as unset. Operators who want fully offline builds need nebi's config file. This is called out in the values comment so nobody reaches for
allowedPorts: []expecting a lockdown and quietly gets the opposite.Testing
helm lintclean. Rendered with defaults (byte-identical tomain) and with each override set, and validated the output withkubeconform(only theNebariAppCR is skipped, since its schema is not public). No unit tests: the chart has no test harness today, and this is template plumbing whose behavior is covered by the render checks above.Chart version bumped 0.1.2 -> 0.1.3.
Access-centered content checklist
Text styling
H1or#in markdown).Non-text content