Skip to content

test: verify distroless image compatibility with the ClickHouse Operator#248

Draft
motsc wants to merge 2 commits into
mainfrom
rah-121-verify-distroless-image-compatibility-with-clickhouse
Draft

test: verify distroless image compatibility with the ClickHouse Operator#248
motsc wants to merge 2 commits into
mainfrom
rah-121-verify-distroless-image-compatibility-with-clickhouse

Conversation

@motsc

@motsc motsc commented Jun 24, 2026

Copy link
Copy Markdown

Why

-distroless images are shell-free (ClickHouse/ClickHouse#105678). The question was whether the operator works on them. It already does, by design: tcpSocket/httpGet probes, no container command (uses the clickhouse docker-init entrypoint), the version probe runs clickhouse local, and no default hooks or init containers. Nothing to fix, just pin it and document it.

What

Adds a switch to the distroless image entry to the existing ClickHouse and Keeper update tables: rolls a running cluster onto the -distroless tag and waits for Ready, which exercises the entrypoint, the probes, and the clickhouse local version-probe Job with no shell in the image. Plus a docs guide, with the caveat that user-supplied exec probes, lifecycle hooks, and init containers must call the binary directly (no /bin/sh).

Both entries pass locally on kind.

Related Issues

Related to ClickHouse/ClickHouse#105678

motsc added 2 commits June 24, 2026 16:24
Add a 'switch to the distroless image' entry to the standalone ClickHouse and
Keeper update tables so the existing create/ready/read-write/version flow also
runs against the shell-free distroless production images
(clickhouse/clickhouse-{server,keeper}:*-distroless, ClickHouse/ClickHouse#105678).
Rolling a running cluster onto the distroless tag and reaching Ready exercises
the clickhouse docker-init entrypoint, the TCPSocket/HTTPGet probes, and the
clickhouse local version-probe Job against an image with no shell.

The shared version assertion strips the -distroless suffix (the reported version
is numeric); the suite preloads the distroless server/keeper images alongside the
existing version matrix via a new DistrolessSuffix constant.
Explain that the operator's defaults are shell-free and work with the distroless
server/keeper images out of the box, and that user-supplied exec probes,
lifecycle hooks, and init containers must invoke the binary directly since the
image has no shell. Add distroless/busybox/coreutils to the Vale vocabulary.

@GrigoryPervakov GrigoryPervakov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distroless images compatibility is verified in compatibility suite https://github.com/ClickHouse/clickhouse-operator/blob/main/.github/workflows/ci.yaml#L245

Instead of using -debug image ephemeral containers may be used

kubectl debug <pod> -it --image=busybox --profile=general --custom=<(echo '{"securityContext":{"runAsNonRoot":false,"runAsUser":0}}') -- /bin/sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants