feat: bundle Deno binary into the operator image - #13
Open
dmmordvi wants to merge 3 commits into
Open
Conversation
TypeScript charts need Deno, which nelm otherwise downloads from GitHub on first render. That needs egress and a writable cache in every pod, so the image now ships the binary and points nelm at it. Deno is dynamically linked against glibc, so the final image moves from distroless/static to distroless/cc. Multi-arch builds are limited to amd64/arm64 because Deno publishes no other linux builds. Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
dmmordvi
force-pushed
the
feat/embed-deno-bin
branch
from
July 31, 2026 18:38
ce13ccd to
9e6ea87
Compare
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
dmmordvi
marked this pull request as ready for review
August 1, 2026 11:41
Signed-off-by: Dmitry Mordvinov <dmitry.mordvinov@flant.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TypeScript charts need a Deno binary. Today nelm downloads it from
github.comon the first TS render, which needs egress from every pod and a writable cache dir. The operator image now ships Deno at/usr/local/bin/denoand points nelm at it viaNELM_DENO_BINARY_PATH, mirroring what nelm itself does for its release binaries in werf/nelm#675.Key changes
denoland/deno:bin-${DENO_VERSION}stage provides just the binary, andCOPY --frompicks the right one per target platform, so no arch mapping, unzip, or checksum handling is needed. Integrity comes from the image digest.gcr.io/distroless/cc-debian12:nonroot— Deno is dynamically linked against glibc (libc,libm,libgcc_s,libpthread,libdl), which distroless/static does not provide.--deno-binary-pathnow falls back to$NELM_DENO_BINARY_PATHbefore nelm's runtime download, following the existingNELM_RELEASE_STORAGE_SQL_CONNECTIONpattern. The flag still wins, so runningmanageroutside this image behaves as before. The path was already plumbed intocommon.TypeScriptOptionsfor plan and install.PLATFORMSnarrowed tolinux/arm64,linux/amd64— Deno publishes no s390x/ppc64le linux builds, somake docker-buildxwith the old default would fail on theCOPY --from=denostep.Why
TypeScript rendering currently fails in air-gapped clusters and in any environment without egress to
github.com, and otherwise costs a ~45 MiB download per cold pod. Shipping the binary makes the image self-contained and removes a network dependency from the reconcile path.Verification
deno --versionfrom the image reports2.7.1 (aarch64-unknown-linux-gnu), andmanager --helpstarts as nonroot under--read-only --tmpfs /tmp.linux/amd64: the bundled binary reportsx86_64-unknown-linux-gnu, confirming the Deno stage resolves per target platform and is not caught by thesedrewrite indocker-buildx, which only patches the firstFROM.Review focus / risks
emptyDirwould keep the default image thin at the cost of chart complexity — worth deciding now if that tradeoff is unacceptable./tmpbeing writable, since Deno'sDENO_DIRresolves to$HOME/.cache/denoandHOME=/tmp. The chart already mounts anemptyDirthere, soreadOnlyRootFilesystem: trueis fine — but a custom deployment dropping that volume would break TS rendering.