8000 feat(deploy): support optional in-cluster PostgreSQL deployment in Helm and Cluster Toolkit by andrzejfudro · Pull Request #1497 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content

feat(deploy): support optional in-cluster PostgreSQL deployment in Helm and Cluster Toolkit - #1497

Draft
andrzejfudro wants to merge 1 commit into
mainfrom
feat/helm-ctk-postgres-deploy
Draft

andrzejfudro wants to merge 1 commit into
mainfrom
feat/helm-ctk-postgres-deploy

Conversation

@andrzejfudro
@andrzejfudro andrzejfudro commented Oct 30, 2026 •
Copy link
Copy Markdown
Collaborator

Summary

  • Add optional in-cluster Kubernetes PostgreSQL (database.postgres.deploy: true, default false for BYO) in deploy/helm/, rendering a ClusterIP Service, idempotent multi-database initdb ConfigMap, and single-replica StatefulSet with optional password support (POSTGRES_HOST_AUTH_METHOD: trust when password is empty).
  • Auto-default PostgreSQL connection parameters (host, port, user, essDatabase, xidDatabase, and sslMode) in _helpers.tpl and db-config.yaml when database.postgres.deploy is true, preserving required settings and verify-full default for BYO (deploy: false).
  • Expose deploy_postgres: true in deploy/ctk_v2/xmanager-cloud.yaml and wire database.postgres.deploy into xmc_app_helm.
  • Add Helm rendering unit tests (test/helm/postgres_deploy_test.py) and Workload Identity parity coverage (test/helm/workload_identity_binding_test.py).

Assumptions

  • None.

TAG=agy
CONV=c378f400-74cf-40e8-a8aa-5f9f91ab0cb1

@gemini-code-assist gemini-code-assist Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for an optional in-cluster PostgreSQL deployment as an alternative database backend to Spanner. It adds the necessary Helm templates (StatefulSet, Service, ConfigMap), helper functions, configuration values, and Python tests, while updating deployment tools to skip Spanner migrations when the PostgreSQL backend is active. The review feedback highlights two improvements in the PostgreSQL StatefulSet: executing pg_isready directly for probes to avoid shell overhead, and quoting the octal defaultMode value ("0755") to prevent YAML parsing issues that lead to incorrect file permissions.

@andrzejfudro
andrzejfudro changed the base branch from main to feat/ctk-byo-postgres October 30, 2026 10:57
@andrzejfudro
andrzejfudro added this pull request to stack #1499 October 30, 2026 10:57
@andrzejfudro
andrzejfudro force-pushed the feat/helm-ctk-postgres-deploy branch from 22ef2d3 to 548ccfd Compare October 30, 2026 10:59
@andrzejfudro andrzejfudro changed the title feat(deploy): support cloud-agnostic PostgreSQL in Helm and Cluster Toolkit feat(deploy): support optional in-cluster PostgreSQL deployment in Helm and Cluster Toolkit Oct 30, 2026
@andrzejfudro
andrzejfudro force-pushed the feat/helm-ctk-postgres-deploy branch from 548ccfd to 0349d9c Compare October 30, 2026 12:03
@andrzejfudro
andrzejfudro force-pushed the feat/helm-ctk-postgres-deploy branch 3 times, most recently from 8bf051e to 36d0d46 Compare October 30, 2026 15:35
Base automatically changed from feat/ctk-byo-postgres to main October 30, 2026 16:05
…lm and Cluster Toolkit

Add optional in-cluster Kubernetes PostgreSQL deployment (`database.postgres.deploy: true`)
in `deploy/helm/` alongside existing Bring-Your-Own PostgreSQL (`database.postgres.deploy: false`),
rendering a `ClusterIP` `Service`, idempotent multi-database `initdb` `ConfigMap`, and
single-replica `StatefulSet` with optional password support (`POSTGRES_HOST_AUTH_METHOD: trust`
when password is empty), auto-defaulted connection settings in `_helpers.tpl`, and
`deploy_postgres` wiring in `deploy/ctk_v2/xmanager-cloud.yaml`.

TAG=agy
CONV=c378f400-74cf-40e8-a8aa-5f9f91ab0cb1
@andrzejfudro
andrzejfudro force-pushed the feat/helm-ctk-postgres-deploy branch from 36d0d46 to 47e5023 Compare October 30, 2026 16:05
@andrzejfudro
andrzejfudro requested a review from AntonTyb October 30, 2026 17:58

This branch has not been deployed

No deployments
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.

2 participants

0