Add PostgreSQL extensions guide and modernize streaming replication docs#1032
Conversation
- Add guides/postgres/custom-versions/extensions.md documenting the extension-enabled (-ext) PostgresVersions: which extensions are bundled (pgvector, PostGIS, pg_repack, pg_cron, pgaudit, pg_stat_statements), how to enable only the ones you need via shared_preload_libraries, and how to create the PostgresVersions by hand on KubeDB releases older than v2026.7.10. Ships sample PostgresVersion manifests for all six -ext versions. - Rewrite guides/postgres/clustering/streaming_replication.md with current behaviour (role label 'standby', *-standby / *-pods services, modern WAL functions) and document the new spec.synchronousReplicationConfig API (mode, numSyncReplicas, commitLevel, standbyNames, useWildcard) with quorum, priority and wildcard examples. Add clustering/sync-postgres.yaml example. All commands and outputs were captured live from a running cluster. Signed-off-by: souravbiswassanto <saurov@appscode.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughAdds streaming and synchronous replication documentation with a matching example, and introduces extension-enabled PostgreSQL catalog manifests, deployment examples, and an end-to-end extensions guide. ChangesStreaming replication
PostgreSQL extensions
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
docs/guides/postgres/clustering/streaming_replication.md (1)
35-36: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse descriptive link text.
The link text "here" is not descriptive, which violates accessibility best practices and triggers the
MD059markdownlint rule. Consider using a more descriptive phrase.♻️ Proposed fix
-Now, install KubeDB cli on your workstation and KubeDB operator in your cluster following the steps -[here](/docs/setup/README.md). +Now, install KubeDB cli on your workstation and KubeDB operator in your cluster following the +[installation steps](/docs/setup/README.md).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/guides/postgres/clustering/streaming_replication.md` around lines 35 - 36, Replace the non-descriptive “here” link text in the KubeDB installation instructions with a phrase that clearly identifies the linked setup documentation, while preserving the existing destination and sentence meaning.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/examples/postgres/extensions/postgresversion-18.3-bookworm-ext.yaml`:
- Around line 39-42: Add the missing stash configuration before the ui field in
docs/examples/postgres/extensions/postgresversion-18.3-bookworm-ext.yaml lines
39-42 and docs/examples/postgres/extensions/postgresversion-18.3-ext.yaml lines
39-42, matching the existing 16.13 and 17.9 manifests and referencing the 18.2
backup and restore tasks.
In `@docs/guides/postgres/clustering/streaming_replication.md`:
- Around line 420-421: Remove the dangling triple-backtick marker at the end of
the streaming replication guide so the document does not open an unclosed
Markdown code block and passes MD040.
In `@docs/guides/postgres/custom-versions/extensions.md`:
- Line 13: Replace the ambiguous “here” link text at
docs/guides/postgres/custom-versions/extensions.md:13 with descriptive text
identifying the KubeDB documentation homepage, and update the link at
docs/guides/postgres/custom-versions/extensions.md:43 to identify the KubeDB
installation guide; preserve both existing link destinations.
- Line 412: Remove the unmatched code fence after the “Next Steps” list in the
documentation file, unless omitted content was intended; in that case, add the
corresponding closing fence and restore the content. Ensure the page’s remaining
text renders as normal Markdown.
- Around line 385-389: Specify the text language on the fenced block containing
the PostgreSQL version filenames by adding the text fence marker, or remove the
fence while preserving the displayed content.
---
Nitpick comments:
In `@docs/guides/postgres/clustering/streaming_replication.md`:
- Around line 35-36: Replace the non-descriptive “here” link text in the KubeDB
installation instructions with a phrase that clearly identifies the linked setup
documentation, while preserving the existing destination and sentence meaning.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c2e18311-f6ef-442e-b2f6-42230af85745
📒 Files selected for processing (11)
docs/examples/postgres/clustering/sync-postgres.yamldocs/examples/postgres/extensions/pg-extensions-config.yamldocs/examples/postgres/extensions/pg-extensions.yamldocs/examples/postgres/extensions/postgresversion-16.13-bookworm-ext.yamldocs/examples/postgres/extensions/postgresversion-16.13-ext.yamldocs/examples/postgres/extensions/postgresversion-17.9-bookworm-ext.yamldocs/examples/postgres/extensions/postgresversion-17.9-ext.yamldocs/examples/postgres/extensions/postgresversion-18.3-bookworm-ext.yamldocs/examples/postgres/extensions/postgresversion-18.3-ext.yamldocs/guides/postgres/clustering/streaming_replication.mddocs/guides/postgres/custom-versions/extensions.md
| securityContext: | ||
| runAsAnyNonRoot: true | ||
| runAsUser: 999 | ||
| ui: |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Missing stash configuration block.
Unlike the 16.13 and 17.9 extension-enabled PostgresVersion manifests, both 18.3 manifests omit the stash block entirely. This omission will break Stash backup and restore integrations for this PostgreSQL version.
docs/examples/postgres/extensions/postgresversion-18.3-bookworm-ext.yaml#L39-L42: Insert thestashconfiguration block before theuifield, referencing the 18.2 backup and restore tasks to match the archiver version.docs/examples/postgres/extensions/postgresversion-18.3-ext.yaml#L39-L42: Insert the samestashconfiguration block before theuifield.
🐛 Proposed addition (for both files)
securityContext:
runAsAnyNonRoot: true # or false depending on the baseOS
runAsUser: 999 # or 70 depending on the baseOS
+ stash:
+ addon:
+ backupTask:
+ name: postgres-backup-18.2
+ restoreTask:
+ name: postgres-restore-18.2
ui:
- name: pgadmin📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| securityContext: | |
| runAsAnyNonRoot: true | |
| runAsUser: 999 | |
| ui: | |
| securityContext: | |
| runAsAnyNonRoot: true | |
| runAsUser: 999 | |
| stash: | |
| addon: | |
| backupTask: | |
| name: postgres-backup-18.2 | |
| restoreTask: | |
| name: postgres-restore-18.2 | |
| ui: |
📍 Affects 2 files
docs/examples/postgres/extensions/postgresversion-18.3-bookworm-ext.yaml#L39-L42(this comment)docs/examples/postgres/extensions/postgresversion-18.3-ext.yaml#L39-L42
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/examples/postgres/extensions/postgresversion-18.3-bookworm-ext.yaml`
around lines 39 - 42, Add the missing stash configuration before the ui field in
docs/examples/postgres/extensions/postgresversion-18.3-bookworm-ext.yaml lines
39-42 and docs/examples/postgres/extensions/postgresversion-18.3-ext.yaml lines
39-42, matching the existing 16.13 and 17.9 manifests and referencing the 18.2
backup and restore tasks.
| section_menu_id: guides | ||
| --- | ||
|
|
||
| > New to KubeDB? Please start [here](/docs/README.md). |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Make setup links descriptive. Both links currently use “here”, which is ambiguous for screen-reader and skim navigation.
docs/guides/postgres/custom-versions/extensions.md#L13-L13: use descriptive text such as “the KubeDB documentation homepage”.docs/guides/postgres/custom-versions/extensions.md#L43-L43: use descriptive text such as “the KubeDB installation guide”.
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)
[warning] 13-13: Link text should be descriptive
(MD059, descriptive-link-text)
📍 Affects 1 file
docs/guides/postgres/custom-versions/extensions.md#L13-L13(this comment)docs/guides/postgres/custom-versions/extensions.md#L43-L43
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/guides/postgres/custom-versions/extensions.md` at line 13, Replace the
ambiguous “here” link text at
docs/guides/postgres/custom-versions/extensions.md:13 with descriptive text
identifying the KubeDB documentation homepage, and update the link at
docs/guides/postgres/custom-versions/extensions.md:43 to identify the KubeDB
installation guide; preserve both existing link destinations.
Source: Linters/SAST tools
| ``` | ||
| postgresversion-16.13-ext.yaml postgresversion-16.13-bookworm-ext.yaml | ||
| postgresversion-17.9-ext.yaml postgresversion-17.9-bookworm-ext.yaml | ||
| postgresversion-18.3-ext.yaml postgresversion-18.3-bookworm-ext.yaml | ||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Specify the language for this fenced block.
Use text (or remove the fence) so Markdown linting and rendering remain deterministic.
Suggested fix
-```
+```text
postgresversion-16.13-ext.yaml postgresversion-16.13-bookworm-ext.yaml
...📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| postgresversion-16.13-ext.yaml postgresversion-16.13-bookworm-ext.yaml | |
| postgresversion-17.9-ext.yaml postgresversion-17.9-bookworm-ext.yaml | |
| postgresversion-18.3-ext.yaml postgresversion-18.3-bookworm-ext.yaml | |
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)
[warning] 385-385: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/guides/postgres/custom-versions/extensions.md` around lines 385 - 389,
Specify the text language on the fenced block containing the PostgreSQL version
filenames by adding the text fence marker, or remove the fence while preserving
the displayed content.
Source: Linters/SAST tools
| - Monitor your PostgreSQL database with KubeDB using [built-in Prometheus](/docs/guides/postgres/monitoring/using-builtin-prometheus.md). | ||
| - Detail concepts of [PostgresVersion object](/docs/guides/postgres/concepts/catalog.md). | ||
| - Want to hack on KubeDB? Check our [contribution guidelines](/docs/CONTRIBUTING.md). | ||
| ``` |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Remove the unmatched code fence at end of file.
This fence opens a code block after the “Next Steps” list and has no closing fence, which can cause the remainder of the page to render as code. Delete it, or add the intended closing fence if content was accidentally omitted.
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)
[warning] 412-412: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/guides/postgres/custom-versions/extensions.md` at line 412, Remove the
unmatched code fence after the “Next Steps” list in the documentation file,
unless omitted content was intended; in that case, add the corresponding closing
fence and restore the content. Ensure the page’s remaining text renders as
normal Markdown.
Source: Linters/SAST tools
Signed-off-by: souravbiswassanto <saurov@appscode.com>
…ptive link text Signed-off-by: souravbiswassanto <saurov@appscode.com>
|
Visit the preview URL for this PR (updated for commit 57ee117): https://kubedb-v2-hugo--pr1032-extension-streaming-nzghyvqw.web.app (expires Wed, 22 Jul 2026 05:48:49 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 0f29ae8ae0bd54a99bf2b223b6833be47acd5943 |
Summary
Two PostgreSQL documentation additions/updates. Every command and output in both guides was captured
live from a running KubeDB cluster (
v2026.7.10).1. New guide: PostgreSQL Extensions
docs/guides/postgres/custom-versions/extensions.mdDocuments the extension-enabled (
-ext) PostgresVersions:-extimage: pgvector, PostGIS, pg_repack, pg_cron, pgaudit, pg_stat_statements.shared_preload_libraries(pg_cron, pgaudit, pg_stat_statements) vs. which just needCREATE EXTENSION(pgvector, PostGIS, pg_repack) — so users can enable only what they need and skip the config Secret entirely when it isn't required.-extversions ship from KubeDB v2026.7.10, and shows how to create the PostgresVersions by hand on earlier releases (copy an existing same-version PostgresVersion and changespec.db.image).-extversions underdocs/examples/postgres/extensions/.2. Rewrite: Streaming Replication
docs/guides/postgres/clustering/streaming_replication.mdrecovery.conf,pg_last_xlog_receive_location(), therole=replicalabel,*-replicasservice) with the current reality (role=standby,*-standby/*-podsservices,pg_last_wal_receive_lsn()).spec.synchronousReplicationConfigAPI (mode,numSyncReplicas,commitLevel,standbyNames,useWildcard) with live quorum / priority / wildcard examples, acommitLevel→synchronous_commitmapping, and a note thatcommitLevel: On/Offmust be quoted in YAML.v2026.7.10+ andpostgres-init >= 0.20.0.docs/examples/postgres/clustering/sync-postgres.yaml.Verification
pg-extensions(18.3-ext), created all six extensions, ran every query shown, validated all six sample PostgresVersion manifests against the API server.ANY 2 (...),FIRST 1 (...)with sync/potential, andANY 1 (*); confirmed hot-standby read-only behaviour.Summary by CodeRabbit