From 45b7a4c4b98b82587bb7a5a7ef53682544aab9d7 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Wed, 6 May 2026 00:33:08 -0400 Subject: [PATCH] fix(cnpg): switch shared-cluster to PG 18 with PostGIS + pgvector image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Cluster CR was being rejected by the cnpg validating webhook: spec.postgresql.parameters.shared_preload_libraries: Invalid value: "vector": Can't set fixed configuration parameter Two issues with that field: cnpg manages shared_preload_libraries itself (it's a "fixed" parameter), and the user-facing field is at spec.postgresql.shared_preload_libraries (top-level array), not under parameters. pgvector doesn't actually require preloading — it loads on CREATE EXTENSION — so dropping the line entirely. Switch the operand image to ghcr.io/cloudnative-pg/postgis:18-3-system-trixie, the cnpg-maintained image that bundles PostGIS, pgvector, pgaudit, and barman-cloud (for backups). Bump the cnpg helm chart from v0.23.1 (operator 1.25.0) to v0.28.0 (operator 1.29.0) — required because PG 18 needs cnpg ≥ 1.26. Validated with `kubectl diff` against the current 1.25 webhook (exit 0, spec accepted). Co-Authored-By: Claude Opus 4.7 (1M context) --- .holo/sources/cloudnative-pg-chart.toml | 2 +- infra/cloudnative-pg/shared-cluster.yaml | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.holo/sources/cloudnative-pg-chart.toml b/.holo/sources/cloudnative-pg-chart.toml index 20f266a..1ac9f69 100644 --- a/.holo/sources/cloudnative-pg-chart.toml +++ b/.holo/sources/cloudnative-pg-chart.toml @@ -1,3 +1,3 @@ [holosource] url = "https://github.com/cloudnative-pg/charts.git" -ref = "refs/tags/cloudnative-pg-v0.23.1" +ref = "refs/tags/cloudnative-pg-v0.28.0" diff --git a/infra/cloudnative-pg/shared-cluster.yaml b/infra/cloudnative-pg/shared-cluster.yaml index 186c7ca..991b5d6 100644 --- a/infra/cloudnative-pg/shared-cluster.yaml +++ b/infra/cloudnative-pg/shared-cluster.yaml @@ -5,17 +5,13 @@ metadata: namespace: cloudnative-pg spec: instances: 3 - imageName: ghcr.io/cloudnative-pg/postgresql:16.1 + imageName: ghcr.io/cloudnative-pg/postgis:18-3-system-trixie storage: size: 20Gi - + managed: roles: - name: balancer login: true passwordSecret: name: balancer-db-credentials - - postgresql: - parameters: - shared_preload_libraries: 'vector'