-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathpostgres.yaml
More file actions
54 lines (49 loc) · 1.33 KB
/
postgres.yaml
File metadata and controls
54 lines (49 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
apiVersion: postgres-operator.crunchydata.com/v1
kind: PostgresCluster
metadata:
name: keycloak
spec:
postgresVersion: 18
instances:
- name: instance1
dataVolumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 1Gi # Zwiększone dla production
users:
- name: keycloak
databases:
- keycloak
service:
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: nlb # Lepsze dla production
labels:
app: keycloak-postgres
type: LoadBalancer
# Usuń nodePort - będzie przydzielony automatycznie
patroni:
dynamicConfiguration:
pg_hba:
- "hostssl all all all md5" # Używaj SSL
# monitoring:
# pgmonitor:
# exporter: {} # Disabled - postgres_exporter not supported for pg18, use OTel instead
backups:
pgbackrest:
repos:
- name: repo1
schedules:
full: "0 2 * * 0" # Pełny backup w niedzielę o 2:00
differential: "0 2 * * 1-6" # Różnicowy backup codziennie o 2:00
volume:
volumeClaimSpec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: 1Gi # Większe dla backupów production
proxy:
pgBouncer: {}