> [!WARNING]
>
> **Preview**
>
>
> This feature is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
> [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA features are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).
>
>
> For information about access to this release, see the [access
> request page](https://forms.gle/zxuHekMtV67Bw9Av9).

This page provides various YAML configuration examples to deploy and manage AlloyDB Omni
using the RPM orchestrator.

### DBCluster configuration

### Minimal DBCluster

A basic configuration to get a standalone DBCluster.

```yaml
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
```

<br />

### Full DBCluster

A comprehensive DBCluster configuration showing all options.

```yaml
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"
```

<br />

### Secret configuration

Example with password:

```yaml
Secret:
  metadata:
    name: db-pw-sample-st-1
  spec:
    type: Opaque
    data:
      sample-st-1: cG9zdGdyZXM=
```

<br />

Example with certs:

```yaml
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>
```

<br />

### PgBouncer configuration

```yaml
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.

```yaml
BackupPlan:
  metadata:
    name: backupplan-sample-dbc
  spec:
    dbclusterRef: sample-dbc
    backupLocation:
      type: GCS
      gcsOptions:
        bucket: sample-backup-bucket
        key: /backups
```

<br />

### Backup configuration

Example of a Backup

```yaml
Backup:
  metadata:
    name: backup-sample
  spec:
    backupPlanRef: backupplan-sample-dbc
    dbclusterRef: sample-dbc
```

### Switchover configuration

Example of a Switchover configuration

```yaml
Switchover:
  metadata:
    name: switchover-alloydb-prod-12345
  spec:
    dbclusterRef: "alloydb-prod"
```

### Switchover configuration

Example of a Failover configuration

```yaml
Failover:
  metadata:
    name: failover-alloydb-prod-abcde
  spec:
    dbclusterRef: "alloydb-prod"
```