Skip to content

Add an optional postgres for the catalog, initialized on first use - #21

Open
ZohebShaikh wants to merge 1 commit into
envoy-proxyfrom
postgres-init
Open

ZohebShaikh wants to merge 1 commit into
envoy-proxyfrom
postgres-init

Conversation

@ZohebShaikh

@ZohebShaikh ZohebShaikh commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #11.

Adds an opt-in postgres (postgresql.enabled, off by default) holding one catalog database shared by every beamline. The postgres image creates the database on first start, and each tiled pod gets an init-catalog init container that runs tiled catalog init --if-not-exists, retrying until postgres is up or while another beamline's pod is initializing it.

The tiled pods get PGHOST, PGUSER, PGPASSWORD and PGDATABASE. To use the bundled postgres, set the tree's uri to postgresql://$PGUSER:$PGPASSWORD@$PGHOST/$PGDATABASE in place of the default sqlite one. The password comes from tiled-secrets key POSTGRES_PASSWORD, and must be URL-safe.

Instructions to reviewer on how to test:

  1. helm lint Charts/tiled --set postgresql.enabled=true
  2. helm template r Charts/tiled --set postgresql.enabled=true and confirm a postgres StatefulSet and Service, and an init-catalog init container on each beamline Deployment
  3. Confirm nothing changes in the render with postgresql.enabled=false

Checks for reviewer

  • Would the PR title make sense to a user on a set of release notes

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.64%. Comparing base (f09a113) to head (77ddc5c).

Additional details and impacted files
@@             Coverage Diff              @@
##           envoy-proxy      #21   +/-   ##
============================================
  Coverage        61.64%   61.64%           
============================================
  Files                3        3           
  Lines              219      219           
============================================
  Hits               135      135           
  Misses              84       84           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

All beamlines share one catalog database, which the postgres image
creates on first start. Each tiled pod gets an init container that runs
tiled catalog init --if-not-exists, retrying until postgres is up or
while another beamline's pod is initializing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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