fix: Decouple AppArmor nsjail installer DaemonSet from workflows.enabled - #356
Merged
Conversation
Add a new retool.appArmorNsjailInstaller.enabled helper that renders the shared AppArmor nsjail installer ConfigMap/DaemonSet whenever codeExecutor.appArmorProfileInstaller is true AND either retool.workflows.enabled or rr.jsExecutor is enabled, instead of gating on workflows.enabled alone. Previously, when jsExecutor was enabled but workflows was not, the installer DaemonSet never rendered, leaving js-executor's wait-for-apparmor init container polling forever. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
|
| Filename | Overview |
|---|---|
| charts/retool/templates/_helpers.tpl | Adds a shared helper that combines the installer flag with the two supported consumer-enablement paths. |
| charts/retool/templates/apparmor_nsjail_configmap.yaml | Replaces the workflows-only rendering conditions with the shared installer helper. |
| charts/retool/templates/apparmor_nsjail_daemonset.yaml | Uses the shared installer helper so the DaemonSet can render for an independently enabled js-executor. |
| charts/retool/values.yaml | Documents the corrected installer rendering conditions for both consumers. |
| charts/retool/Chart.yaml | Increments the Helm chart patch version for the rendering fix. |
Reviews (2): Last reviewed commit: "chore: sync root values.yaml comment and..." | Re-trigger Greptile
- Mirror the appArmorProfileInstaller doc comment update into the top-level values.yaml (kept in sync with charts/retool/values.yaml per .github/workflows/values-yaml-synced.yaml). - Bump charts/retool/Chart.yaml to 6.11.14 (ct lint requires a version bump for chart changes). Co-authored-by: Cursor <cursoragent@cursor.com>
mako-taco
marked this pull request as ready for review
July 31, 2026 21:20
mertbozfakioglu
approved these changes
Jul 31, 2026
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
Fixes an AppArmor installer gate mismatch flagged by Greptile on PR #355 (#355 (comment)): when
rr.jsExecutor.enabled=trueandcodeExecutor.appArmorProfileInstaller=truebutworkflows.enabled=false, the js-executor pod'swait-for-apparmorinit container polls forever for/host-run/retool-executor.loaded, but the DaemonSet that creates that file (apparmor_nsjail_daemonset.yaml) was gated onretool.workflows.enabledand never rendered — so js-executor pods hang in Init forever.rr.jsExecutoris an independent RR component that does not requireworkflows.enabledto be true, so gating the shared AppArmor installer DaemonSet/ConfigMap onworkflows.enabledalone was incorrect; it needs to render whenever EITHER of its two consumers needs it (legacycode-executor, which is workflows-gated, OR RRjs-executor, which is not).Changes
retool.appArmorNsjailInstaller.enabledin_helpers.tplthat returns "1" whencodeExecutor.appArmorProfileInstalleris true AND eitherretool.workflows.enabledORrr.jsExecutoris enabled.apparmor_nsjail_daemonset.yamlandapparmor_nsjail_configmap.yamlnow gate on this new helper instead of the oldworkflows.enabled+appArmorProfileInstallerdouble-if.values.yamlandcharts/retool/ci/test-apparmor-nsjail-option.yamlto describe the corrected gating logic.rr.agentSandbox.appArmorProfileInstaller(used by the separate gVisor-based agent-sandbox node-installer DaemonSet) was already self-contained and gated purely on its own component-enabled check, so it did not have this bug.Testing
helm lintandhelm templateagainst all existingcharts/retool/ci/*option.yamloverlays pass with no changes in behavior for existing configurations.helm templatethat the new gate correctly handles all 4 combinations of (workflows.enabled,rr.jsExecutor.enabled) x (codeExecutor.appArmorProfileInstallertrue/false) — renders only when the flag is true AND at least one consumer is enabled; unaffected when neither consumer needs it.kernel.apparmor_restrict_unprivileged_userns=1): deployed just the DaemonSet + ConfigMap + js-executor Deployment into an isolated test namespace withworkflows.enabled: false. Confirmed the DaemonSet still rolls out and loads the AppArmor profile on every node (AppArmor profiles loaded successfullyin theinstallinit container logs), and the js-executor pod'swait-for-apparmorinit container completed instantly (Terminated/Completed, not hung) because the profile file was already present — the pod reached1/1 Runningwith thecontainer.apparmor.security.beta.kubernetes.io/js-executor: localhost/retool-executorannotation correctly applied (confined, not unconfined). Test namespace was torn down afterward; the real deployedretoolHelm release on that cluster was untouched throughout.