Skip to main content

Schedule workloads on dedicated node pools

You can schedule agent sandboxes and JavaScript executors on dedicated Kubernetes node pools when you self-host Retool. Use this configuration to separate workloads for capacity planning or internal infrastructure policies.

Note

This configuration requires Helm chart 6.13.6 or later. On earlier versions, the nodeSelector and tolerations settings under rr.jsExecutor and the codeExecutor.appArmorInstaller block don't exist, so the JavaScript executor and AppArmor installer keep the top-level placement.

Configure node pools​

Label and taint your node pools through your Kubernetes provider. Use a NoSchedule taint to keep other workloads off a dedicated pool.

A nodeSelector restricts pods to nodes with matching labels. A toleration allows pods onto nodes with matching taints, but doesn't restrict them to those nodes. Use both to dedicate a pool: select its label and tolerate its taint.

Set Helm scheduling values​

Add the following settings to your existing values.yaml. Replace the placeholders with the labels and taints on your node pools. These settings change placement; they don't enable components or provision node pools.

values.yaml
rr:
agentSandbox:
nodeSelector:
kubernetes.io/arch: amd64
<sandbox-node-label>: <value>
tolerations:
- key: <sandbox-taint-key>
operator: Equal
value: <value>
effect: NoSchedule
jsExecutor:
nodeSelector:
kubernetes.io/arch: amd64
<js-executor-node-label>: <value>
tolerations:
- key: <js-executor-taint-key>
operator: Equal
value: <value>
effect: NoSchedule

Each component's nonempty nodeSelector replaces the top-level selector rather than merging with it. Include every required label, including kubernetes.io/arch: amd64, which the chart sets by default.

The selector and tolerations fall back independently. An empty component selector ({}) uses the top-level nodeSelector; an empty tolerations list ([]) uses the top-level tolerations. An empty list doesn't clear inherited tolerations.

The settings apply to these workloads:

Helm valuesWorkloads
rr.agentSandbox.nodeSelector and tolerationsSandbox job pods, controller, proxy, image prepuller, node installer, and device plugin.
rr.jsExecutor.nodeSelector and tolerationsJavaScript executor pods.
Top-level nodeSelector and tolerationsShared defaults, including the workflow code executor.

rr.agentSandbox.affinity applies to the controller and proxy, not sandbox job pods. Use nodeSelector and tolerations to place the job pods. The workflow code executor has no separate nodeSelector or tolerations setting.

Place the AppArmor installer​

If codeExecutor.appArmorProfileInstaller is enabled, its DaemonSet must run on every node that can host JavaScript executor or workflow code executor pods. Its placement uses codeExecutor.appArmorInstaller, not rr.jsExecutor, and falls back to the top-level values.

Set the installer's selector and tolerations to match the nodes that run the JavaScript executor:

values.yaml
codeExecutor:
appArmorInstaller:
nodeSelector:
kubernetes.io/arch: amd64
<js-executor-node-label>: <value>
tolerations:
- key: <js-executor-taint-key>
operator: Equal
value: <value>
effect: NoSchedule

Include tolerations for any additional taints on those nodes. The workflow code executor uses the top-level placement, so the installer must also reach any nodes where it runs. If the installer can't reach an executor node, the executor's wait-for-apparmor init container can't finish.