-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathshared-v17.yaml
91 lines (88 loc) · 2.45 KB
/
shared-v17.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: shared-psql-v17
namespace: default
annotations:
kyverno.io/ignore: "true"
spec:
# using only 1 replica: very difficult to drain the node where postgres is running
# using more than 1 replica: write amplification issues when leveraging replicated storage (e.g. ceph)
instances: 2
imageName: ghcr.io/cloudnative-pg/postgresql:17.2
primaryUpdateStrategy: unsupervised
storage:
size: 40Gi
storageClass: rook-ceph-block
enableSuperuserAccess: true
superuserSecret:
name: cloudnative-pg
postgresql:
parameters:
max_connections: "300"
shared_buffers: 512MB
monitoring:
enablePodMonitor: true
resources:
requests:
memory: "512Mi"
limits:
memory: "2Gi"
backup:
retentionPolicy: 30d
barmanObjectStore:
wal:
compression: bzip2
maxParallel: 4
destinationPath: s3://postgresql/
endpointURL: http://minio.kube-system.svc:9000
serverName: shared-v17
s3Credentials:
accessKeyId:
name: cloudnative-pg
key: MINIO_ACCESS_KEY
secretAccessKey:
name: cloudnative-pg
key: MINIO_SECRET_KEY
# bootstrap:
# Used to recover a net-new cluster from backups
# recovery:
# source: shared-psql-backup
# use to migrate from an existing cnpg cluster to a new cluster
# initdb:
# import:
# type: monolith
# databases:
# - "*"
# roles:
# - "*"
# source:
# externalCluster: shared-psql-v16
# externalClusters:
# Represents the backups stored in minio which can be restored from.
# - name: shared-psql-backup
# barmanObjectStore:
# wal:
# compression: bzip2
# maxParallel: 4
# destinationPath: s3://postgresql/
# endpointURL: http://minio.kube-system.svc:9000
# serverName: shared-v17
# s3Credentials:
# accessKeyId:
# name: cloudnative-pg
# key: MINIO_ACCESS_KEY
# secretAccessKey:
# name: cloudnative-pg
# key: MINIO_SECRET_KEY
# Represents the previous cluster to migrate from
# - name: shared-psql-v16
# connectionParameters:
# host: shared-psql-v16-rw.default.svc
# user: postgres
# dbname: postgres
# sslmode: require
# password:
# name: cloudnative-pg
# key: password