This page provides various YAML configuration examples to deploy and manage AlloyDB Omni using the Red Hat RPM orchestrator.
DBCluster configuration
Minimal DBCluster
A basic configuration to get a standalone DBCluster.
DBCluster : metadata : name : alloydb-prod spec : databaseVersion : 18.1.0 primarySpec : adminUser : passwordRef : name : db-pw-alloydb-prod resources : disks : - name : DataDisk path : /mnt/disks/pgsql
Full DBCluster
A comprehensive DBCluster configuration showing all options.
DBCluster : metadata : name : alloydb-prod spec : databaseVersion : 18.1.0 mode : "" availability : numberOfStandbys : 2 enableAutoFailover : true enableAutoHeal : true autoFailoverTriggerThreshold : 2 autoHealTriggerThreshold : 2 healthcheckPeriodSeconds : 10 primarySpec : adminUser : passwordRef : name : db-pw-alloydb-prod parameters : max_connections : "100" max_wal_size : "2GB" max_worker_processes : "32" log_connections : "on" log_disconnections : "on" log_hostname : "on" log_statement : "none" huge_pages : "off" tcp_keepalives_idle : "10" tcp_keepalives_interval : "10" tcp_keepalives_count : "10" resources : cpu : 16 memory : 64Gi disks : - name : DataDisk path : /mnt/disks/pgsql - name : ObsDisk path : /obs dbLoadBalancerOptions : onprem : loadBalancerIP : 10.1.0.95 loadBalancerType : "internal" loadBalancerInterface : "eth0"
Secret configuration
Example with password:
Secret : metadata : name : db-pw-sample-st-1 spec : type : Opaque data : sample-st-1 : cG9zdGdyZXM=
Example with certs:
Secret : metadata : name : dbs-alloydbomni-cluster spec : type : Opaque data : ca.crt : < base64_ca_certificate > tls.crt : < base64_tls_certificate > tls.key : < base64_tls_private_key >
PgBouncer configuration
PgBouncer : metadata : name : pgbouncer-sample spec : accessMode : "rw" allowSuperUserAccess : true dbClusterRef : dbcluster-sample port : 6432
BackupPlan configuration
The following sample shows how to configure a BackupPlan that stores backups in a Cloud Storage bucket.
BackupPlan : metadata : name : backupplan-sample-dbc spec : dbclusterRef : sample-dbc backupLocation : type : GCS gcsOptions : bucket : sample-backup-bucket key : /backups
Backup configuration
Example of a Backup
Backup : metadata : name : backup-sample spec : backupPlanRef : backupplan-sample-dbc dbclusterRef : sample-dbc
Switchover configuration
Example of a Switchover configuration
Switchover : metadata : name : switchover-alloydb-prod-12345 spec : dbclusterRef : "alloydb-prod"
Switchover configuration
Example of a Failover configuration
Failover : metadata : name : failover-alloydb-prod-abcde spec : dbclusterRef : "alloydb-prod"

