# Audit event backend: PostgreSQL.
# Works against any PostgreSQL 14+ (self-hosted, RDS, Cloud SQL,
# Azure Database for PostgreSQL Flexible Server). Place in
# /etc/almaforge/almad.d/ on each host.
apiVersion: almaforge.com/v1
kind: StorageConfig
metadata:
  name: audit
spec:
  postgres:
    # Replace the user, password, host, database, and sslmode for your
    # PostgreSQL deployment.
    # Use sslmode=verify-full unless your Postgres endpoint is isolated
    # and protected by another mutually authenticated transport.
    connString: >-
      postgres://almaforge:<paste-from-password-store>@audit-db.example.com:5432/almaforge_audit?sslmode=verify-full
    # Duration after which the background sweeper deletes audit rows.
    auditRetentionPeriod: 8760h
