Skip to content
Open
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.11.15
version: 6.11.16
maintainers:
- name: Retool Engineering
email: engineering+helm@retool.com
Expand Down
27 changes: 27 additions & 0 deletions charts/retool/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,33 @@ Two classes of stale config are caught:
{{- end -}}
{{- end -}}

{{/*
Render the seccomp-install initContainer image reference.

The pinned digest lives here, not in values.yaml, so that overrides actually
take effect. Helm deep-merges values, so a default digest in values.yaml would
survive any user override of initImage.repository/tag and keep pulling the
original pinned image (a digest always wins over a tag in an image ref), or
fail outright against a mirror that lacks that digest. Instead we only append
the pinned digest when the repository and tag are still the chart defaults and
the user hasn't supplied their own digest.
Usage: (include "retool.initImage" .)
*/}}
{{- define "retool.initImage" -}}
{{- $i := .Values.initImage -}}
{{- $defaultRepository := "busybox" -}}
{{- $defaultTag := "1.37.0" -}}
{{- $defaultDigest := "sha256:b3255e7dfbcd10cb367af0d409747d511aeb66dfac98cf30e97e87e4207dd76f" -}}
{{- $repository := $i.repository -}}
{{- $tag := toString $i.tag -}}
{{- $digest := $i.digest | default "" -}}
{{- if and (not $digest) (eq $repository $defaultRepository) (eq $tag $defaultTag) -}}
{{- $digest = $defaultDigest -}}
{{- end -}}
{{- printf "%s:%s" $repository $tag -}}
{{- if $digest }}@{{ $digest }}{{ end -}}
{{- end -}}

{{/*
Set code executor image tag
Usage: (template "retool.codeExecutor.image.tag" .)
Expand Down
2 changes: 1 addition & 1 deletion charts/retool/templates/deployment_code_executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
initContainers:
{{- if $useSecComp }}
- name: install-seccomp
image: busybox:1.37.0@sha256:b3255e7dfbcd10cb367af0d409747d511aeb66dfac98cf30e97e87e4207dd76f
image: {{ include "retool.initImage" . }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand Down
2 changes: 1 addition & 1 deletion charts/retool/templates/deployment_js_executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
{{- end }}
initContainers:
- name: install-seccomp
image: busybox:1.37.0@sha256:b3255e7dfbcd10cb367af0d409747d511aeb66dfac98cf30e97e87e4207dd76f
image: {{ include "retool.initImage" . }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand Down
18 changes: 18 additions & 0 deletions charts/retool/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@ image:
tag: ""
pullPolicy: "IfNotPresent"

# Small utility image for the initContainers that install the nsjail seccomp
# profile onto the host, on the code executor and JS executor. Only used when
# seccomp is in play.
#
# Override repository if every image has to come from one registry -- a private
# mirror, an air-gapped install, or GCP Marketplace, which rejects any artifact
# a consumer pulls from outside its own Artifact Registry.
#
# The upstream busybox image is pinned to a known-good digest internally, but
# only while repository and tag are left at their defaults below. Overriding
# either drops that pin automatically (a copied image gets a new digest, so the
# original would pin you back to the source registry and fail the pull). Set
# digest here to pin your own mirrored image by digest.
initImage:
repository: busybox
tag: '1.37.0'
digest: ''

commandline:
args: []

Expand Down
18 changes: 18 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@ image:
tag: ""
pullPolicy: "IfNotPresent"

# Small utility image for the initContainers that install the nsjail seccomp
# profile onto the host, on the code executor and JS executor. Only used when
# seccomp is in play.
#
# Override repository if every image has to come from one registry -- a private
# mirror, an air-gapped install, or GCP Marketplace, which rejects any artifact
# a consumer pulls from outside its own Artifact Registry.
#
# The upstream busybox image is pinned to a known-good digest internally, but
# only while repository and tag are left at their defaults below. Overriding
# either drops that pin automatically (a copied image gets a new digest, so the
# original would pin you back to the source registry and fail the pull). Set
# digest here to pin your own mirrored image by digest.
initImage:
repository: busybox
tag: '1.37.0'
digest: ''

commandline:
args: []

Expand Down