codeInterpreter.enabled is true.
Put subchart settings under the hyphenated code-interpreter: key. Helm ignores other keys under codeInterpreter:.
values.yaml
Chart versions
The Onyx chart pins the Code Interpreter chart version. Onyx chart 0.8.35 and later pins Code Interpreter chart 0.4.8. Earlier Onyx charts pin 0.4.7. You cannot change a subchart version with values.Sections and keys marked 0.4.8 need Code Interpreter chart 0.4.8 or later (Onyx chart 0.8.35 or later).
With an older Onyx chart, install the Code Interpreter chart directly to use them.
Code Interpreter 0.4.7 ignores these settings.
Install the Code Interpreter chart directly
1
Install Code Interpreter as its own release
code-interpreter: key:code-interpreter-values.yaml
2
Point Onyx at the new release
values.yaml
http://code-interpreter.<namespace>.svc.cluster.local:8000.Network isolation
Executor pods always get a NetworkPolicy that denies all egress. By default, an init container also blocks egress with iptables before user code starts. This init container runs as root with theNET_ADMIN capability.
values.yaml
Restricted Pod Security and OpenShift (0.4.8)
Executor pods meet the Kubernetesrestricted Pod Security Standard when netAdminLockdown is false.
OpenShift restricted-v2 assigns user and group IDs from the namespace range, and rejects fixed IDs.
Use platform mode, and let OpenShift assign the IDs of the service pod too:
values.yaml
- The chart fails to render
mode: platformwithnetAdminLockdown: true. platformmode needs an admission controller that assigns a user ID. The executor image runs as root by default.- On other clusters, keep
mode: fixed. It usesrunAsUser,runAsGroup, andfsGroup65532. Change the IDs if your policy needs other values. - With
readOnlyRootFilesystem: true(the default), user code can write only to/workspaceand/tmp.
Images
Both Code Interpreter images uselatest by default. The service image uses pull policy Always.
The executor image has no tag, so it also resolves to latest with pull policy Always,
and each run checks the registry.
Pin both images:
values.yaml
- Pin tags that exist on Docker Hub. Onyx does not publish the images for every chart version.
- Use
IfNotPresentorNeveron nodes that cannot reach the registry. - With 0.4.8, a run fails at once on an image pull error. It fails after
readyTimeoutSecif the pod staysPending.
Dedicated node pool and resources (0.4.8)
The top-levelnodeSelector, tolerations, and affinity apply only to the service pod.
Use kubernetesExecutor.pod to run user code on its own nodes:
values.yaml
podalso acceptsaffinity,topologySpreadConstraints,priorityClassName,labels, andannotations.- Set the memory limit with
memoryLimitMb. The chart ignorespodResources.limits.memory. - The service does not start if these values are not valid.
Capacity and overload (0.4.8)
Each replica runs at mostcapacity.maxConcurrentExecutions runs at a time.
A request waits up to capacity.queueTimeoutSec for a free slot.
values.yaml
At the default executor size, 16 runs need about 4 GiB of memory limits and 1.6 CPU of requests.
Increase
maxConcurrentExecutions only when the cluster can schedule that many executor pods for each replica.
Executor ResourceQuota
To limit what executor pods can use, turn on the optional ResourceQuota. It counts every pod in its namespace, so use a dedicated executor namespace. The namespace must exist.values.yaml
- Each open session holds one pod for its full lifetime. Include sessions in
pods. - The chart fails to render a quota in the release namespace unless you set
executorResourceQuota.allowReleaseNamespace: true. - If you add
ephemeral-storagekeys tohard, also setexecutorResourceQuota.limitRange.enabled: true.
Metrics
The service serves Prometheus metrics at/metrics on its HTTP port. To create a ServiceMonitor,
set metrics.serviceMonitor.enabled to true. This needs the Prometheus Operator CRDs.
Useful metrics include code_interpreter_executions_active,
code_interpreter_executions_rejected_total (by status and reason), and code_interpreter_admission_wait_seconds.
Health endpoints (0.4.8)
A busy replica stays ready and returns
429. If you override readinessProbe, use /ready.
More than one replica (0.4.8)
Each replica stores uploaded files and outputs on its own disk. Onyx uploads a file and runs code in separate requests. With more than one replica, the run can go to a replica that does not have the file, and the run fails. The chart fails to renderreplicaCount greater than 1 unless you set fileStorage.shared: true.
Set it only after you do one of these:
- Mount a
ReadWriteManyvolume atFILE_STORAGE_DIR(default/tmp/code-interpreter-files) on every replica. - Send each client to one replica (sticky sessions).
values.yaml