apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  annotations:
    a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
  name: forgejo-cnpg
  namespace: forgejo
spec:
  backup:
    barmanObjectStore:
      data:
        compression: gzip
      destinationPath: s3://k8s-and-chill-backups/forgejo/cnpg
      endpointURL: https://fsn1.your-objectstorage.com
      s3Credentials:
        accessKeyId:
          key: ACCESS_KEY_ID
          name: forgejo-backup-s3
        secretAccessKey:
          key: SECRET_ACCESS_KEY
          name: forgejo-backup-s3
      wal:
        compression: gzip
    retentionPolicy: 30d
    target: prefer-standby
  bootstrap:
    initdb:
      database: forgejo
      owner: forgejo
  instances: 2
  postgresql:
    parameters:
      effective_cache_size: 128MB
      maintenance_work_mem: 32MB
      max_connections: "50"
      shared_buffers: 64MB
      work_mem: 4MB
  resources:
    limits:
      memory: 512Mi
    requests:
      cpu: 100m
      memory: 256Mi
  storage:
    size: 5Gi
    storageClass: hcloud-volumes
