Database
Database
Defines the high-level declarative intent for a managed database instance.
This manifest currently targets PostgreSQL clusters, translating into primary instances, read-pool instances, and associated IAM access controls.
| Property | Type | Description |
|---|---|---|
| apiVersion | string | |
| kind | string | |
| metadata | map | |
| spec | Spec | User-defined configuration for the database cluster. |
Spec
Defines the user-provided configuration for the database cluster. Instructs the execution engine on sizing, tuning, and protection policies.
| Property | Type | Description |
|---|---|---|
| description | string | This description is optional but will drastically improve the understand of the AI assistant about the structural elements of the organization |
| cpuCount | int64 | The number of vCPUs to allocate to each instance in the database cluster. This value is passed directly to the machine sizing constraints for both primary and read pool instances. |
| clusterSize | int64 | The total number of instances in the cluster. A size of 1 means a single primary instance with no read replicas. This controls the creation of read pool instances by spawning secondary nodes when the size is greater than 1. |
| configuration | Configuration | Advanced configuration options for the database instance. These fields govern engine execution flags and tuning settings mapped to the underlying managed instances. |
| backupConfig | BackupConfig | Defines the automated backup policy for the database cluster. These fields configure the automated backup schedules, retention periods, and windows. |
BackupConfig
Defines the automated backup policies. Configures the underlying cluster to enforce snapshot schedules and retention rules.
| Property | Type | Description |
|---|---|---|
| enabled | bool | If true, automated backups will be enabled for the database cluster. |
| timeBasedRetentionSec | int64 | The number of seconds to retain backups. Only one of time_based_retention_sec or quantity_based_retention can be set. |
| quantityBasedRetention | int64 | The number of backups to retain. Only one of time_based_retention_sec or quantity_based_retention can be set. |
| windowDuration | string | The duration of the backup window, in a format like 3600s. |
| daysOfWeek | list of string | A list of days of the week when backups are allowed to occur (e.g., MONDAY, WEDNESDAY). |
| hours | int64 | The hour of the day (in UTC) when the backup window starts. |
| minutes | int64 | The minute of the hour when the backup window starts. |
Configuration
Advanced PostgreSQL configuration parameters. Translates into the custom database flags mapped on the underlying compute instances to tune query performance.
| Property | Type | Description |
|---|---|---|
| maxConnections | int64 | The maximum number of concurrent connections allowed to the database. |
| autoExplain | bool | If true, enables the auto_explain PostgreSQL module to log execution plans of slow queries. |
| googleColumnarEngine | bool | If true, enables the AlloyDB columnar engine for accelerating analytical queries. |
| googleDbAdvisor | bool | If true, enables the AlloyDB Index Advisor to provide recommendations for improving query performance. |