Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for modifying securityContext for code executor #152

Merged
merged 4 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/retool/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: retool
description: A Helm chart for Kubernetes
type: application
version: 6.0.16
version: 6.0.17
maintainers:
- name: Retool Engineering
email: [email protected]
Expand Down
4 changes: 4 additions & 0 deletions charts/retool/templates/deployment_code_executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ spec:
image: "{{ .Values.codeExecutor.image.repository }}:{{ include "retool.codeExecutor.image.tag" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{ if .Values.codeExecutor.securityContext }}
{{ toYaml .Values.codeExecutor.securityContext | indent 10 }}
{{ else }}
privileged: true
{{ end }}
avimoondra marked this conversation as resolved.
Show resolved Hide resolved
env:
- name: DEPLOYMENT_TEMPLATE_TYPE
value: {{ template "retool.deploymentTemplateType" . }}
Expand Down
6 changes: 6 additions & 0 deletions charts/retool/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ codeExecutor:
cpu: 1000m
memory: 1024Mi

# code executor uses nsjail to sandbox code execution. nsjail requires privileged container access.
# If your deployment does not support privileged access, you can set `privileged` to false to not
# use nsjail. Without nsjail, all code is run without sandboxing within your deployment.
securityContext:
privileged: true

image:
repository: tryretool/code-executor-service
# defaults to image.tag if >= 3.20.15, otherwise defaults to 1.1.0; explicitly set to override.
Expand Down
6 changes: 6 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,12 @@ codeExecutor:
cpu: 1000m
memory: 1024Mi

# code executor uses nsjail to sandbox code execution. nsjail requires privileged container access.
# If your deployment does not support privileged access, you can set `privileged` to false to not
# use nsjail. Without nsjail, all code is run without sandboxing within your deployment.
securityContext:
privileged: true

image:
repository: tryretool/code-executor-service
# defaults to image.tag if >= 3.20.15, otherwise defaults to 1.1.0; explicitly set to override.
Expand Down
Loading