92 lines
2.4 KiB
YAML
92 lines
2.4 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/postgresql.cnpg.io/cluster_v1.json
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: postgres
|
|
namespace: databases
|
|
spec:
|
|
postgresUID: 99
|
|
postgresGID: 100
|
|
instances: 3
|
|
imageName: ghcr.io/cloudnative-pg/postgresql:16.5-1
|
|
primaryUpdateStrategy: unsupervised
|
|
storage:
|
|
size: 20Gi
|
|
storageClass: nfs-provision-csi-database
|
|
superuserSecret:
|
|
name: cloudnative-pg
|
|
enableSuperuserAccess: true
|
|
postgresql:
|
|
parameters:
|
|
max_connections: "600"
|
|
max_slot_wal_keep_size: 10GB
|
|
shared_buffers: 512MB
|
|
nodeMaintenanceWindow:
|
|
inProgress: false
|
|
reusePVC: true
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 2Gi
|
|
limits:
|
|
cpu: 1
|
|
memory: 4Gi
|
|
monitoring:
|
|
enablePodMonitor: true
|
|
# backup:
|
|
# retentionPolicy: 30d
|
|
# barmanObjectStore: &barmanObjectStore
|
|
# data:
|
|
# compression: bzip2
|
|
# wal:
|
|
# compression: bzip2
|
|
# maxParallel: 8
|
|
# destinationPath: "s3://cloudnative-pg-v1"
|
|
# endpointURL: "https://${SECRET_QNAP_HOSTNAME}:8010"
|
|
# # Note: serverName version needs to be incremented or changed
|
|
# # when recovering from an existing cnpg cluster
|
|
# serverName: ¤tCluster postgres-v2
|
|
# s3Credentials:
|
|
# accessKeyId:
|
|
# name: cloudnative-pg
|
|
# key: s3-key-id
|
|
# secretAccessKey:
|
|
# name: cloudnative-pg
|
|
# key: s3-secret-key
|
|
# # Note: externalClusters is needed when recovering from an existing cnpg cluster
|
|
# externalClusters:
|
|
# # s3 instance recovery
|
|
# - name: &previousCluster postgres-v1
|
|
# barmanObjectStore:
|
|
# <<: *barmanObjectStore
|
|
# serverName: *previousCluster
|
|
# running instance
|
|
#- name: postgres
|
|
# connectionParameters:
|
|
# host: 10.1.0.23
|
|
# user: postgres
|
|
# dbname: postgres
|
|
# sslmode: require
|
|
# password:
|
|
# name: cloudnative-pg
|
|
# key: password
|
|
|
|
# Note: previousCluster needs to be set to the name of the previous
|
|
# cluster when recovering from an existing cnpg cluster
|
|
bootstrap:
|
|
# # s3 instance recovery
|
|
# recovery:
|
|
# source: *previousCluster
|
|
# recover from another running instance
|
|
initdb:
|
|
database: homeops
|
|
# import:
|
|
# type: monolith
|
|
# databases:
|
|
# - "*"
|
|
# roles:
|
|
# - "*"
|
|
# source:
|
|
# externalCluster: postgres
|