Repository navigation
feat(chart): run the Kates database on CloudNativePG - #600
Merged
Merged
Conversation
Add an opt-in cnpg.enabled value that replaces the bundled single Postgres with a CloudNativePG Cluster: three instances by default, one per node, with synchronous replication that prefers availability. The API and the migration job reach the primary through the -rw Service and read the password from the operator's -app Secret. The JDBC URL gets socket, connect and keepalive timeouts so a dead primary fails fast and the API reconnects to the new one. The chart refuses to render with postgresql.enabled or externalDatabase.enabled set, or without the postgresql.cnpg.io/v1 API. The book documents the install and a tested migration. A single operator replica on the lost node delays failover to 366 s; two replicas spread across nodes brought database reads back in 83 s.
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.
Summary
cnpg.enabled: a CloudNativePGClusterreplaces the bundled single Postgres. Three instances by default, one per node, synchronous replication withdataDurability: preferred.-rwService and the operator's-appSecret. The JDBC URL gets connect, socket and keepalive timeouts.postgresql.enabledorexternalDatabase.enabledset, or when thepostgresql.cnpg.io/v1API is absent.katesto 0.17.0 andkates-platformto 0.8.27. Defaults are unchanged.Test results
Throwaway four-node kind cluster:
The operator performs the failover, so a single replica on the lost node delays it. The book gives the two-replica values.
Passing locally:
helm lint, the new CI assertion step,chart_bumps, version pins, book style and index,actionlint,TestMCPCaveat.Not covered
helm templateof thekates-platformumbrella fails locally in thekafka-clustersubchart's test-11 tiered-storage template. Not compared against main.kates deploydoes not install CNPG yet. That follow-up must not switch an existing bundled release, since--hadefaults to true and the switch would start an empty database.