ansible/roles/openshift-apps/forgejo/templates/postgres-cluster.yaml.j2
David Kirwan 0702e29cab
forgejo: Add configuration for crunchydata postgresql db
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2025-04-16 16:40:35 +01:00

59 lines
1.6 KiB
Django/Jinja

apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
annotations:
postgres-operator.crunchydata.com/autoCreateUserSchema: "true"
name: forgejo-ha
namespace: forgejo
spec:
spec:
users:
- name: gitea
databases:
- gitea
options: 'SUPERUSER'
postgresVersion: 17
instances:
- name: forgejo-ha
replicas: 2
dataVolumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 50Gi
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
postgres-operator.crunchydata.com/cluster: forgejo-ha
postgres-operator.crunchydata.com/instance-set: forgejo-ha
backups:
pgbackrest:
repos:
- name: repo1
volume:
volumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 50Gi
proxy:
pgBouncer:
replicas: 2
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
postgres-operator.crunchydata.com/cluster: forgejo-ha
postgres-operator.crunchydata.com/role: pgbouncer