Skip to content

fix(sentry): let clickhouse 25.3 start under the chart's read-only users dir - #162

Merged
TheMeinerLP merged 1 commit into
mainfrom
fix/sentry-clickhouse-skip-user-setup
Aug 16, 2026
Merged

fix(sentry): let clickhouse 25.3 start under the chart's read-only users dir#162
TheMeinerLP merged 1 commit into
mainfrom
fix/sentry-clickhouse-skip-user-setup

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Collaborator

The image pin from #158 was necessary but not sufficient. The upgrade still failed and Flux rolled back to 23.8 five times (Stalled=True: Failed to upgrade after 5 attempt(s), StatefulSet/sentry/clickhouse status: 'Failed').

Not the image. Ran the tag as a throwaway pod: pulls and runs, exit 0.

The entrypoint. ClickHouse images from 24.x on run a user-setup step; with neither CLICKHOUSE_USER nor CLICKHOUSE_PASSWORD set it writes users.d/default-user.xml. This chart mounts users.d from a ConfigMap, so the path is read-only and the container dies before the server starts:

/entrypoint.sh: line 156: /etc/clickhouse-server/users.d/default-user.xml: Read-only file system

Confirmed by running the image with the chart's three ConfigMaps mounted (fails exactly there), then again with CLICKHOUSE_SKIP_USER_SETUP=1 (starts cleanly, merges the config files). 23.8 had no such step, which is why it only surfaced after the version bump.

Skipping is correct rather than a workaround: the chart's users ConfigMap already defines default.

Why a postRenderer: the chart has no env: block at all — it only exports SHARD in the container command — so this cannot come from values.

Side effect: changing the spec also clears the HelmRelease Stalled state, so Flux retries on its own.

🤖 Generated with Claude Code

…ers dir

The image pin from #158 was necessary but not sufficient: the upgrade still
failed and Flux rolled back to 23.8 five times, reporting

  StatefulSet/sentry/clickhouse status: 'Failed'

The image itself is fine -- it pulls and runs. What breaks is the entrypoint.
ClickHouse images from 24.x on run a user-setup step: with neither
CLICKHOUSE_USER nor CLICKHOUSE_PASSWORD set, it writes
users.d/default-user.xml to disable network access for `default`. This chart
mounts users.d from a ConfigMap, so that path is read-only and the container
dies before the server starts:

  /entrypoint.sh: line 156:
    /etc/clickhouse-server/users.d/default-user.xml: Read-only file system

Verified by running the image with the chart's three ConfigMaps mounted: it
fails exactly there, and starts cleanly once CLICKHOUSE_SKIP_USER_SETUP=1 is
set. The chart's users ConfigMap already defines `default`, so skipping the
step is correct rather than a workaround.

The chart has no env: block -- it only exports SHARD in the container
command -- so this cannot come from values and is patched in via the
postRenderer that already sets the priority class.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Qx7mKDeDhysBWsqtqM1yr
@TheMeinerLP
TheMeinerLP merged commit 150a6ba into main Aug 16, 2026
5 checks passed
@TheMeinerLP
TheMeinerLP deleted the fix/sentry-clickhouse-skip-user-setup branch August 16, 2026 19:18
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.

1 participant