add CloudNativePG operator and HA postgres cluster
This commit is contained in:
parent
cc75fa6dbc
commit
2a5ddda96c
6 changed files with 116 additions and 0 deletions
23
apps/postgres/cluster.yaml
Normal file
23
apps/postgres/cluster.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: postgres-cluster
|
||||
namespace: postgres
|
||||
spec:
|
||||
instances: 2
|
||||
primaryUpdateStrategy: unsupervised
|
||||
|
||||
enableSuperuserAccess: true
|
||||
|
||||
postgresql:
|
||||
parameters:
|
||||
shared_buffers: "256MB"
|
||||
max_connections: "200"
|
||||
|
||||
storage:
|
||||
size: 10Gi
|
||||
storageClass: hcloud-volumes
|
||||
|
||||
affinity:
|
||||
enablePodAntiAffinity: true
|
||||
topologyKey: kubernetes.io/hostname
|
||||
Loading…
Add table
Add a link
Reference in a new issue