replicaCount: 2

datastore:
  engine: postgres
  uriSecret: prod-openfga-db-superuser
  migrationType: initContainer

ingress:
  enabled: true
  className: nginx
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
  hosts:
    - host: openfga.srv.oceanbox.io
      paths:
        - path: /
          pathType: ImplementationSpecific
  tls:
   - secretName: prod-openfga-tls
     hosts:
       - openfga.srv.oceanbox.io

extraObjects:
 - apiVersion: postgresql.cnpg.io/v1
   kind: Cluster
   metadata:
     name: prod-openfga-db
     namespace: openfga
   spec:
     instances: 2
     imageName: ghcr.io/cloudnative-pg/postgresql:17-bookworm
     storage:
       resizeInUseVolumes: true
       size: 10Gi
     plugins:
     - name: barman-cloud.cloudnative-pg.io
       isWALArchiver: true
       parameters:
         barmanObjectName: tos-store
 - apiVersion: barmancloud.cnpg.io/v1
   kind: ObjectStore
   metadata:
     name: tos-store
     namespace: openfga
   spec:
     retentionPolicy: "7d"
     configuration:
       destinationPath: s3://cnpg/prod-openfga-db
       endpointURL: http://10.255.241.30:30080
       s3Credentials:
         accessKeyId:
           name: cnpg-s3
           key: access_key
         secretAccessKey:
           name: cnpg-s3
           key: access_secret
       wal:
         compression: snappy
 - apiVersion: postgresql.cnpg.io/v1
   kind: ScheduledBackup
   metadata:
     name: prod-openfga-db
     namespace: openfga
   spec:
     schedule: "0 0 1 * * *"
     backupOwnerReference: self
     cluster:
       name: prod-openfga-db
     method: plugin
     pluginConfiguration:
       name: barman-cloud.cloudnative-pg.io
 - apiVersion: monitoring.coreos.com/v1
   kind: PodMonitor
   metadata:
    name: prod-openfga-db-monitor
   spec:
     selector:
       matchLabels:
         cnpg.io/cluster: prod-openfga-db
     podMetricsEndpoints:
     - port: metrics
