Files
gitops/add-ons/postgres/cluster.yaml
T
2026-10-10 12:23:13 +05:30

56 lines
1.3 KiB
YAML

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: postgres
namespace: postgres
spec:
enablePDB: false
imageName: ghcr.io/cloudnative-pg/postgresql:18
instances: 1
managed:
roles:
- ensure: present
login: true
name: authentik
passwordSecret:
name: authentik-db
- ensure: present
login: true
name: grafana
passwordSecret:
name: grafana-db
- ensure: present
login: true
name: legislative
passwordSecret:
name: legislative-db
- ensure: present
inRoles:
- pg_read_all_data
login: true
name: pgweb
passwordSecret:
name: pgweb-db
- ensure: present
login: true
name: redoost
passwordSecret:
name: redoost-db
postgresql:
# Each app role may only connect to the database of the same name.
# pgweb is read-only and may browse every database except authentik's,
# which holds credentials and session tokens.
pg_hba:
- host sameuser all all scram-sha-256
- host authentik pgweb all reject
- host all pgweb all scram-sha-256
- host all all all reject
resources:
limits:
memory: 1Gi
requests:
cpu: 100m
memory: 256Mi
storage:
size: 5Gi