Release notes for CloudNativePG 1.30
History of user-visible changes in the 1.30 minor release of CloudNativePG.
For a complete list of changes, please refer to the commits on the release branch in GitHub.
Version 1.30.0-rc1
Release date: Jun 19, 2026
Important changes
- The
clusterreference is now immutable on theDatabase,Pooler,Publication,Subscription, andScheduledBackupresources. Pointing one of these objects at a different cluster has no well-defined semantics and previously left the controllers in an inconsistent state; the update is now rejected at the API server via a CEL validation rule. (#10743)
Features
-
Primary
Leasefor safe primary election: introduced a KubernetesLeaseobject (named after the cluster) that acts as a mutex serializing primary promotion: the instance manager must hold the lease before acting as primary and releases it on clean shutdown so replicas can promote without waiting for the full TTL. Timings are configurable via the new.spec.primaryLeasestanza. The lease is a promotion gate, not a fence — primary isolation remains responsible for fencing. (#10627) -
DatabaseRoleCRD for declarative role management: introduced aDatabaseRolecustom resource that manages a PostgreSQL role as a standalone Kubernetes object, instead of declaring it inline in theCluster's.spec.managed.rolesstanza. Each role gets its own lifecycle, status, and RBAC, which suits GitOps workflows and lets role definitions live next to the applications that own them. The spec reuses the sameRoleConfigurationstructure as the inline method, so migrating a role is a matter of moving the stanza into its own manifest. AdatabaseRoleReclaimPolicyfield (retain, the default, ordelete) controls what happens to the role when the resource is deleted, mirroring persistent volumes. (#6155) -
TLS client certificates for declarative roles: a
DatabaseRolecan now include aclientCertificateblock to have the operator automatically generate and renew a TLS client certificate, signed by the cluster's client CA and stored in a<databaserole-name>-client-certSecret. This enables password-free PostgreSQLcertauthentication; the Secret is cleaned up when the feature is disabled or theDatabaseRoleis deleted. (#10896) -
PgBouncer image management via image catalogs: the
Poolerresource can now reference an entry in anImageCatalogorClusterImageCatalogthrough the newspec.pgbouncer.imageCatalogReffield, centralizing PgBouncer image management. When a catalog entry is updated, all referencingPoolersare automatically reconciled and roll out the new image without any change to their spec. The resolved image is reported instatus.image, and a newstatus.phase(active,paused,inactive, orfailed) — also surfaced as aPhasecolumn inkubectl get pooler— summarizes the lifecycle. (#10568)
Enhancements
-
Enabled
pg_upgradein-place major upgrades to PostgreSQL 19 or later for clusters that use Image Volume extensions, building on the extension-path support added topg_upgradein PostgreSQL 19. During the upgradeJob, the source- and target-version extension images are mounted side by side, so the old server keeps its libraries and a failed upgrade reverts cleanly. (#10366) -
Added TLS support for the
Poolermetrics endpoint via.spec.monitoring.tls.enabled. When enabled, the metrics server is served over HTTPS, reusing the certificate and key from.spec.pgbouncer.clientTLSSecretand reloading it on every handshake to support rotation without a restart; the generatedPodMonitorscrapes overhttpsaccordingly. (#10466) -
Added a label selector to the
Clusterscale subresource (status.selector), making aClustera validtargetReffor the Vertical Pod Autoscaler (VPA) and Horizontal Pod Autoscaler (HPA), which can now map aClusterto its instance pods. Contributed by @sebv004. (#8996) -
The operator now emits a
WarningPrimaryStatusCheckFailedevent on theClusterwhen the primary pod isReadyfrom the kubelet perspective but the operator's/pg/statuscheck fails and failover is deferred, giving users visibility into the deferral viakubectl describe cluster. (#10509) -
Added the
ENABLE_WEBHOOK_NAMESPACE_SUFFIXflag, which suffixes the operator's webhook configuration names with-<OPERATOR_NAMESPACE>so that multiple operator instances can coexist on the same cluster. The operator only looks up these configurations; users must create and maintain them. Contributed by @maxlengdell. (#10420) -
The operator now reloads a CNPG-i plugin automatically when its pods are rolled: it watches the
EndpointSlicesbacking pluginServicesand re-enqueues every cluster using the plugin once the new pods becomeReady, so an upgraded plugin is picked up without waiting for the next resync. (#10836) -
Instance serial numbers are now assigned by reusing the lowest free slot among existing instance names, instead of always incrementing a global counter. Pod and PVC names stay stable across instance recreation (for example, an instance recreated after a node drain comes back with the same name), and serials freed by deleted instances are reclaimed. A new
Initializedcluster condition reports whether the cluster has completed its first bootstrap, andstatus.latestGeneratedNodeis deprecated: it is no longer written, but is preserved on the CRD for backward compatibility. (#10548) -
Defaulting and validation now run during reconciliation as a fallback when admission webhooks are unavailable, or configured to ignore failures, so the operator no longer reconciles invalid or incomplete specs. Missing defaults are applied directly, and validation failures are surfaced in the resource status instead of failing silently later. (#10874)
Security
-
search_pathpinning on operator-issued connections: a database owner could plant overloaded built-in operators in thepublicschema and alter thesearch_pathso that operator introspection probes, running as the cluster superuser, resolved those overloads beforepg_catalog— aCWE-426privilege-escalation chain (same class asCVE-2018-1058) that could lead to in-pod RCE viaCOPY ... FROM PROGRAM. The operator now pinssearch_path = pg_catalog, public, pg_tempon every pooled connection so it ships in the startup message and takes precedence over tenant-controlled defaults. (#10774) -
Authenticated operator-to-instance-manager calls: the instance manager's remote webserver previously accepted unauthenticated requests, so any process on the pod network could trigger backups, instance manager upgrades, or WAL archival. The operator now generates an in-memory ECDSA P-256 client certificate at startup and reconciles its SHA-256 fingerprint into the cluster status; the instance manager rejects requests to sensitive endpoints that do not present a matching certificate. (#10579)
-
Operator-side SCRAM-SHA-256 password encoding: the operator now SCRAM-SHA-256 encodes cleartext role passwords before issuing
CREATE/ALTER ROLE ... PASSWORD, so the literal PostgreSQL parses (and that extensions such aspg_stat_statementsorpgauditmay capture) is the SCRAM verifier rather than the cleartext secret. Pre-hashed (MD5 or SCRAM) values are forwarded unchanged, and the per-Secret annotationcnpg.io/passwordPassthrough: "enabled"opts out. (#10724)
Changes
-
Added support for Kubernetes 1.36. (#10900)
-
Updated the default PostgreSQL version to 18.4. (#10719)
-
Updated the Kubernetes versions used to test the operator on public cloud providers. (#10720, #10563)
Fixes
-
Fixed declarative
Database,Publication, andSubscriptionobjects reporting a stale primary-side status forever after their cluster was demoted to a replica; the controller now re-checks the replica condition and watches theClusterso a demotion is detected promptly. (#10871) -
Fixed non-sequential pod names (for example
-1,-3) caused by the instance serial counter being advanced before the correspondingJoband PVCs were created; the bump is now persisted only after those resources exist. (#10491) -
Fixed deletion of a
Database,Publication, orSubscriptiongetting stuck inTerminatingon a replica cluster, where the replica gate ran before the finalizer reconciler and the finalizer was never released. On a replica the PostgreSQL object is left to the primary cluster. (#10853) -
Fixed a conflicting duplicate
DatabaseorSubscriptionwith adeletereclaim policy dropping the PostgreSQL object owned by the surviving CR; the drop is now gated on a recorded reconciliation. (#10870) -
Fixed the
postgressuperuser being left locked out after superuser access was disabled and then re-enabled, because the cached secret version was not invalidated and the password was never re-applied. Diagnosed by @mhartmann-jaconi. (#10834) -
Fixed backups getting stuck in the
startedphase when the instance manager running them was restarted (for example by the in-place upgrade following an operator upgrade) before the backup reachedrunning; the reconciliation is now rescheduled so the lost session is detected. (#10859) -
Fixed
exec/attachstreaming to negotiate WebSocket with a SPDY fallback, restoring compatibility both with Kubernetes versions that have removed SPDY and with platforms such as OpenShift that reject WebSocket exec upgrades. Contributed by @bartscheers. (#10876, #10933) -
Fixed resource leaks when concurrent
Backupobjects raced: backups now run in strict creation-time order, so an already-executing backup is never preempted by a newer one and its replication slot and PostgreSQL session are no longer orphaned on the primary. Contributed by @GabriFedi97. (#10747) -
Fixed role reconciliation clearing the password on a PostgreSQL role when the referenced Secret could not be fetched; the role is now left untouched until the Secret becomes available, and per-action errors are aggregated for better visibility. (#10053)
-
Fixed a bootstrap failure where a metrics-exporter setup error (commonly a duplicate-key race with the controller) rolled back
streaming_replicacreation and wedged replica joins. The metrics-exporter step now runs in a separate transaction. Contributed by @BlaiseAntony. (#10749) -
Fixed a
ScheduledBackupcontroller loop that occurred when aBackupwas created but its status patch never landed; the controller now adopts an existingBackupfor the next iteration instead of looping onAlreadyExists. (#10612) -
Fixed a nil-pointer panic when reconciling a
PoolerwhoseClusterhas been deleted. (#10667) -
Fixed bootstrap log handling so that all named log pipes (
postgres,postgres.csv, andpostgres.json) get consumers duringWithActiveInstance, preventing regular files from being created in place of the named pipes. (#10043) -
Fixed generation of invalid IPv6 URLs by wrapping the address in square brackets. Contributed by @Infinoid. (#10682)
-
Fixed an external cluster plugin still being treated as active when its configuration set
enabled: false. (#10932) -
Fixed a race during bootstrap recovery from an object store where the restore job could read a stale
Cluster(primary not yet recorded and timeline still unset) and have its.historyfiles rejected by the split-brain guard. When this happened, recovery stopped at the base backup's timeline and silently dropped transactions committed on later timelines. History files are now allowed while the cluster timeline is unset. Contributed by @dennispidun. (#10818)
Supported versions
- Kubernetes 1.36, 1.35, and 1.34
- PostgreSQL 18, 17, 16, 15, and 14
- PostgreSQL 18.4 is the default image
- PostgreSQL 14 support ends on November 12, 2026