Repository navigation
The Helm chart runs Loom with an external Postgres as the memory authority, and an overlay sets up ClickHouse Cloud plus Managed Postgres - #467
Merged
Conversation
…ority, and an overlay sets up ClickHouse Cloud plus Managed Postgres Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The overlay states the web process count the image picks for the chart's limits, and the budget follows; the chart refuses DSN fields it would pass through unescaped and a pool smaller than its minimum; the docs say what the boot refuses and warns about. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The chart refuses the block's settings in settingsFile too, a port that is not a port number, and a pool smaller than the minimum the server will read; the NetworkPolicy always lists the Postgres port; the docs grant pg_read_all_stats and name namespaces in the SQL user example. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The pool's minimum is left to the boot, which fails closed, and values.yaml states the rule; the Postgres page says the chart sets the settings, not the service; the helm rule names the list the block's refusals share. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The NetworkPolicy comment lists the Postgres port; the gate renders the env route that works without the block; the CA check names OpenSSL 3; the exec example names the Deployment it holds. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The port is refused with a leading zero and rendered as a number in the DSN and the NetworkPolicy; the guide says the pods refuse to start on a ClickHouse that holds memory; the gate's default render has the policy on, so its port check can fail. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The port check caps the digits, so an overflowing number is refused, and the gate renders another port into the DSN and the policy; each Secret gets its own ExternalSecret; the guide lists every refusal; values.yaml names the third overlay. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The guide says what a commit answers while standbys are missing; the Secret names and keys render quoted; the durability comment names local. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The chart refuses an empty or malformed Secret key for the password and the CA, and the NetworkPolicy comment reads as one paragraph. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The Secret key check refuses '.' and keys starting '..', as Kubernetes does; the guide points to the block's comments for the refusal rules instead of listing them; the gate renders every route the refusals cover without the block. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The gate renders a release with no postgres key; a host, database or user that is not a string is refused rather than printed into the DSN; the block's comments name the names the chart refuses; the guide says what a busy pool answers. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The guide says when the old CA Secret can go, and states the pool bound once. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The CA steps name ca.crt as the file the check reads and the Secret holds, and where leaf.pem and chain.pem come from. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The gate's refusal renders take the same required values as its other renders, so the refusal under test is the only reason one can fail. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
This was referenced Nov 10, 2026
Merged
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.
Related: #450
Related: #461
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
The Helm chart takes a
postgresblock that runs Loom with an external Postgres as the memory authority over verify-full TLS, andvalues-clickhouse-cloud.yamlwith a guide sets up ClickHouse Cloud plus ClickHouse Managed Postgres.Why
The chart had no Postgres values. An operator could pass
LOOM_PG_DSNonly throughenvorsecrets.extra. Those routes did three things wrong:sslmode=verify-fullneeds;There was also no documented, tested way to run Loom on the two managed services. This PR adds one
postgres:block to the chart and an overlay and guide for ClickHouse Cloud plus Managed Postgres with two HA standbys.Design
postgres: {host, port, database, user, passwordSecret {name, key}, caSecret {name, key}, durability, poolMaxSize}.host: ""keeps the ClickHouse authority, and the default render is byte-identical to main's.--reuse-valuesfrom a chart without the block renders as before.postgres.hostrenders. These go into every pod that getsloom.config: web, workers, the three hook Jobs and the analytics export. They come through shared helpers (loom.postgres,loom.pgEnv,loom.pgVolume,loom.pgVolumeMount), so no pod kind can miss one.LOOM_STORAGE_AUTHORITY=postgres,LOOM_PG_DURABILITYandLOOM_PG_POOL_MAX_SIZE, inloom.config.LOOM_PG_DSN=postgres://<user>@<host>:<port>/<db>?sslmode=verify-full&sslrootcert=/etc/loom/pg-ca/<key>. It holds no password.PGPASSWORDfromsecretKeyRef. asyncpg reads it when the DSN has none, so the password never appears in the pod spec and needs no URL encoding./etc/loom/pg-ca.networkPolicy.enabled, egress topostgres.port.postgres.passwordSecret.nameorpostgres.caSecret.name. verify-full cannot run without a CA.host,databaseoruseroutside letters, digits,.,_and-, since those go into the DSN as written. It also refuses aportthat is not 1 to 65535, and a password or CA Secret key outside the characters Kubernetes allows in one. ApoolMaxSizebelowLOOM_PG_POOL_MIN_SIZEis left to the boot, which fails closed;values.yamlstates the rule.env,extraEnv,secrets.extraorsettingsFilesets a name it renders:LOOM_STORAGE_AUTHORITY,LOOM_PG_DSN,LOOM_PG_DURABILITY,LOOM_PG_POOL_MAX_SIZEorPGPASSWORD. Set twice, one value would silently win.existingSecretandenvFrom, as Kubernetes orders them. The guide says so.values-clickhouse-cloud.yamllayers onvalues-eks.yaml(-f values-eks.yaml -f values-clickhouse-cloud.yaml).postgresblock, withdurability: synchronous(the service's two HA standbys) and Secretsloom-postgresandloom-postgres-ca.poolMaxSize: 5andwebWorkers: 2. Two is what the image picks for the chart's 2-CPU limit. It is stated so the documented connection count (70) is explicit.docs/operations/clickhouse-cloud.mdlinks the pages that own each part instead of repeating them: postgres.md, kubernetes.md, deployment.md and sql-surface.md. It states:pg_read_all_statsgrant for the standby check;openssl verify -no-CApath -no-CAstore … -verify_hostnamepre-check;kubectl exec -iand the admin password on stdin from a file.Scope and risk
deploy/helm/loom:values.yaml,_helpers.tpl,hooks.yaml,analytics-export.yaml,networkpolicy.yamland the new overlay;scripts/gates/helm_postgres.pywithtests/unit/test_helm_postgres.py;llms.txt);.claude/rules/helm.md.postgres.hostunset, nothing changes. The renders of both existing overlays, with and without every optional object, are identical to main's.postgres:16another change is building for the chart fills this same block.Compatibility, rollout and rollback
postgres.*at install, on an empty ClickHouse.postgres.hostcannot drop the block: its deployment recorded the Postgres authority.Tests
scripts/gates/helm_postgres.py, run bytests/unit/test_helm_postgres.pyand the CI helm job, renders the chart.PGPASSWORDfrom the Secret;sslrootcertnames, from thecaSecretkey.postgres.port=6432reaches the DSN and the policy as the same number.networkPolicy.enabled=false, the egress-only policy is the same with and without the block.KeyError: 'LOOM_STORAGE_AUTHORITY') and passes here.helm lint --strictandkubeconform -strictpass on the EKS, kind, and EKS plus Cloud overlays, with and without every optional object.postgres:16with a synchronous standby (dev/ci_start_postgres.sh), the primary serving TLS from a throwaway CA, and an empty ClickHouse 26.10. The server ran with the exact env the chart renders: password-lesssslmode=verify-fullDSN,PGPASSWORD,LOOM_STORAGE_AUTHORITY=postgres.GET /v1/health?include=postgresansweredstorage_authority: postgres,pg_ok: true,standby: synchronous.pg_stat_sslshowed TLS on every Loom connection.memory.setlanded inloom.memory_currentand read back.SSLCertVerificationErrorand exited.ALTER ROLE … PASSWORDand dropped the server's connections.memory.setanswered 500 and the log showedInvalidPasswordError. With the password restored, the next call succeeded.kubectl execgrant form, run as the samesh -c 'read -r LOOM_CH_PASSWORD; …'with the password on stdin, created and then revoked an SQL user. Only the innersh -cran here, notkubectl execagainst a cluster.test_helm_metadata_egress.py,test_doc_links.py,test_public_copy.py,test_agent_instructions.pyandtest_docs_reference.pypass.pg_read_all_statsgrant on Managed Postgres;AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. The design was reviewed to zero findings by an architect subagent before coding. The render gate, the overlay renders and the live boot above were run here.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code