Repository navigation
Conversation
Build rdkafka with ssl-vendored and libz-static, so the taskbroker binary only needs glibc at runtime. This lets it run on a glibc-only distroless base, like relay did in getsentry/relay#4978. The debian image runs the same binary, so it now uses OpenSSL 3.6 from openssl-src instead of the system libssl3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a taskbroker-distroless stage on the DHI static glibc Debian 13 base and publish it next to the current image as <sha>-distroless and nightly-distroless on GHCR, and <sha>-distroless in both production registries. The debian stage stays last, so builds without --target produce the same image as today. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Add a
taskbroker-distrolessstage to the Dockerfile and publish it next to the current image:ghcr.io/getsentry/taskbroker:<sha>-distrolessand:nightly-distroless(amd64 + arm64)<sha>-distrolessinus-central1-docker.pkg.dev/sentryio/taskbroker/imageandus-docker.pkg.dev/sentryio/taskbroker-mr/imageThe debian stage stays last, so builds without
--targetproduce the same image, and:nightly,:latestand self-hosted are unchanged. Nothing deploys the distroless image yet. The self-hosted e2e test now runs against both variants.The base is the DHI
staticglibc Debian 13 image from the AR mirror, the same one relay uses. It has no shell or package manager and runs as nonroot (uid 65532). Brokers in k8s already use gRPC probes and setrunAsUser: 1000withfsGroup, so switching a region only needs the image tag.This also changes the current image. The first commit builds rdkafka with
ssl-vendoredandlibz-static(like getsentry/relay#4978), so the binary only needs glibc. The debian image runs the same binary, so production moves from the system libssl3 to OpenSSL 3.6 fromopenssl-src. Brokers usesasl_plaintextwith SCRAM, so this affects SASL hashing, not certificate handling. OpenSSL updates now come throughopenssl-srcbumps instead of the base image. I can split this commit into its own PR if we'd rather deploy it alone first.The distroless stage copies a prepared
/optonto/: the base already has a root-owned/optand no shell to fix that, and taskbroker reads./VERSIONand defaults to./taskbroker-inflight.sqliterelative to it. The distroless builds read the per-architecture build cache from #817 but don't export it, so they don't overwrite the default build's cache index.trivy, local arm64 builds of this branch:
Other bases considered:
gcr.io/distroless/cc-debian13ships libssl3 and zlib, so it needs no Cargo change, but it isn't the DHI base the rest of Sentry uses. A fully static musl build would use the musl allocator, which is slow under multithreaded load.🤖 Generated with Claude Code