Summary
Comparison with the production infra-prod CNPG cluster (flicknote-deploy Helm chart) revealed several missing features needed for production parity.
Missing Features
Critical (Blocking Production Use)
High Priority (Production Recommended)
Medium Priority (Nice to Have)
Current Implementation
The operator currently creates:
- ✅ CNPG Cluster with managed roles + additional custom roles
- ✅ Init SQL ConfigMap (schemas, grants, PostgREST DDL watch)
- ✅ Barman plugin reference on Cluster (when backup.enabled)
- ✅ Pod anti-affinity when instances > 1
- ✅ pgaudit and auto_explain settings
- ❌ Missing: ObjectStore, ScheduledBackup CRDs
Reference
Production Helm chart: flicknote-deploy/charts/cnpg-cluster/
templates/cluster.yaml - Cluster with recovery support
templates/objectstore.yaml - ObjectStore CRD
templates/scheduled-backup.yaml - ScheduledBackup CRD
templates/publications.yaml - Publication CRD (consumers create their own)
templates/database.yaml - Database CRD for extensions (consumers create their own)
Acceptance Criteria
- Operator can restore from an existing CNPG backup (recovery mode)
- Operator creates working scheduled backups to S3/R2
Pod anti-affinity works for HA deployments ✅
Summary
Comparison with the production
infra-prodCNPG cluster (flicknote-deploy Helm chart) revealed several missing features needed for production parity.Missing Features
Critical (Blocking Production Use)
Recovery (PITR) - Support point-in-time recovery from existing backups
spec.database.recovery.enabledspec.database.recovery.source- externalClusters referencespec.database.recovery.serverName- original cluster name in backupspec.database.recovery.targetTime- optional PITR target (RFC 3339)spec.database.recovery.objectStore- S3 credentials for backup sourcerecoveryinstead ofinitdbScheduledBackup CRD - Currently only adding barman plugin to Cluster, not creating the backup schedule
ScheduledBackupresource with cron scheduleObjectStore CRD - Backup destination configuration
barmancloud.cnpg.io/v1 ObjectStoreresourceHigh Priority (Production Recommended)
Pod Anti-Affinity - Spread replicas across nodes for HA
instances > 1Publication CRD- Won't fix: consumers can create their own CNPG Publication CRDsAdditional Roles - Custom roles beyond Supabase defaults
spec.database.additionalRoles[]for roles likesequin_replicationMedium Priority (Nice to Have)
Database CRD- Won't fix: consumers can create their own CNPG Database CRDs for extensionsauto_explain settings - Performance debugging
auto_explain.log_min_duration: "1s"auto_explain.log_analyze/buffers/timing/nested_statements: "on"pgaudit settings - Audit logging
pgaudit.log: "function, ddl, role"Current Implementation
The operator currently creates:
Reference
Production Helm chart:
flicknote-deploy/charts/cnpg-cluster/templates/cluster.yaml- Cluster with recovery supporttemplates/objectstore.yaml- ObjectStore CRDtemplates/scheduled-backup.yaml- ScheduledBackup CRDtemplates/publications.yaml- Publication CRD (consumers create their own)templates/database.yaml- Database CRD for extensions (consumers create their own)Acceptance Criteria
Pod anti-affinity works for HA deployments✅