Skip to content

[feat] Add rr.appServingLayer and per-sandbox editor origins - #383

Draft
erichsu7 wants to merge 9 commits into
mainfrom
ehsu/jakarta
Draft

erichsu7 wants to merge 9 commits into
mainfrom
ehsu/jakarta

Conversation

@erichsu7

@erichsu7 erichsu7 commented Sep 23, 2026 •

Copy link
Copy Markdown

Adds opt-in values for serving R² apps on their own origins on self-hosted, instead of the null-origin iframe.

  • rr.appServingLayer runs SERVICE_TYPE=RR_APP_SERVING_LAYER in its own Deployment, Service and PDB, mirroring the Retool Cloud split. domain is rendered as RR_APP_DOMAIN on the serving layer and the main backend. The serving layer also gets the blob storage, workflow backend and js executor settings it needs. It does not inherit rr.enabled, because it needs an apps domain with wildcard DNS and a certificate that only the operator can supply, and the render fails if it is enabled without domain or the git server.
  • rr.agentSandbox.wildcardSandboxes serves each editor sandbox at sandbox-<id>.sandboxes.<rr.appServingLayer.domain> by setting AGENT_SANDBOX_FRONTEND_WILDCARD_DOMAIN on the backend and the agent-sandbox proxy. rr.agentSandbox.frontendWildcardDomain, the same key the cloud agent-executor chart uses, overrides the derived root, for example to put sandboxes on a separate domain.

Everything defaults to off, so existing installs render the same.

Test plan: new CI fixture ci/test-rr-app-serving-layer-option.yaml covers the serving layer and the derived sandbox domain, and ci/test-agent-sandbox-enabled-option.yaml now sets the frontendWildcardDomain override; both run through kubeconform. Rendered by hand to check that the stock and rr.enabled: true installs create no serving-layer objects, that a missing domain fails, that wildcardSandboxes without the serving layer fails, and that a domain that isn't a lowercase hostname (uppercase, scheme, port, path, or trailing dot) fails in both rr.appServingLayer.domain and rr.agentSandbox.frontendWildcardDomain.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; no blocking issue remains.

Reviews (2) · Last reviewed commit: "Treat only true as enabling rr.appServin..." · Reviewed by Greptile

Comment thread charts/retool/templates/_helpers.tpl Outdated
Comment thread charts/retool/templates/deployment_rr_app_serving_layer.yaml Outdated
Comment thread charts/retool/ci/test-rr-app-serving-layer-option.yaml
erichsu7 and others added 3 commits October 9, 2026 16:41
Runs SERVICE_TYPE=RR_APP_SERVING_LAYER in its own Deployment and Service,
mirroring the Retool Cloud split. Opt-in only: it needs an apps domain,
wildcard DNS and a certificate the chart cannot supply. Requires the git
server, since published assets live in the same blob storage.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Adds retool.appServingLayer.selectorLabels/labels so the Service, Deployment
and pods carry app.kubernetes.io/name and app.kubernetes.io/instance,
matching dbconnector and the workflow components. Selector is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Published-app backend functions (/_/api/executeV2) run on the js executor and
call back through the workflow backend. Without these the serving layer fails
with "Could not determine backend host" on self-hosted, where the org has no
subdomain to fall back to. Values match the main backend.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copy link
Copy Markdown
Author

erichsu7 and others added 3 commits October 9, 2026 17:52
Serves each editor sandbox at sandbox-<id>.<frontendWildcardDomain> on its own
origin. Emitted as AGENT_SANDBOX_FRONTEND_WILDCARD_DOMAIN on the backend,
workflows, and workers (via backendEnvVars) and on the proxy container.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@erichsu7 erichsu7 changed the title Add rr.appServingLayer: dedicated R2 app serving layer deployment [feat] Add rr.appServingLayer and rr.agentSandbox.frontendWildcardDomain Oct 10, 2026
@erichsu7 erichsu7 changed the title [feat] Add rr.appServingLayer and rr.agentSandbox.frontendWildcardDomain [feat] Add rr.appServingLayer and per-sandbox editor origins Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant