forgejo: add the template for creating the PostgresCluster

Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
David Kirwan 2025-03-28 14:09:46 +00:00
parent 17cd3edbc7
commit df246f9ffc
No known key found for this signature in database
GPG key ID: A5893AB6474AC37D

View file

@ -0,0 +1,51 @@
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: forgejo-ha
namespace: forgejo
spec:
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