PostgresCluster
resourceType postgresql · provider cnpg · default provider (omit provider to get this one) · sharing Private · cleanup Orphan
Provisions a dedicated CloudNativePG cluster with an application database and owner role (via bootstrap.initdb), continuous backups to object storage, and the cloud backup storage + identity primitives.
Request it
Add this to your PlatformApplication's spec.resourceRequirements (optional parameters are in the table below):
resourceRequirements:
- resourceType: postgresql
resourceName: my-postgresql # your handle — drives the env-var prefix + secret name
parameters:
dbName: <value>
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
dbName | string | yes | — | Name of the application database to create on the dedicated cluster. |
owner | string | no | — | Owner role (application user) for the database. Defaults to dbName. |
instances | string | no | 3 | Number of Postgres instances (1 primary + replicas). |
storageSize | string | no | 20Gi | Persistent volume size per instance (e.g. 20Gi). |
postgresVersion | string | no | 16 | PostgreSQL major version (CNPG image tag). |
backupRetention | string | no | 30d | Backup retention policy (e.g. 30d). |
provisionStorage | string | no | true | Provision the backup bucket + identity and enable managed backups: 'true' or 'false'. When 'false', the cluster is created without backups. |
Connection
On grant, a connection secret is published with these tokens and injected into your workload as {RESOURCENAME}_{TOKEN} (UPPER_SNAKE) — e.g. resourceName: my-db → MY_DB_URL, MY_DB_USERNAME, …:
hostportusernamepassworddbname
Status
| Field | Description |
|---|---|
clusterName | Name of the CNPG cluster. |
databaseName | Name of the application database. |
Auto-generated from the PostgresCluster XRD + postgresql-cnpg ResourceCapability. Do not edit by hand.