prole/cloudnative-pg-prole-dB.yaml

72 lines
1.8 KiB
YAML

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: prole-db
spec:
instances: 3
imageName: prole-db:17.5-027
maxSyncReplicas: 1
postgresql:
parameters:
shared_buffers: 256MB
pg_stat_statements.max: '10000'
pg_stat_statements.track: all
pg_hba:
- host all all all scram-sha-256
- hostssl prole prole-db all scram-sha-256
bootstrap:
initdb:
database: prole-db
owner: prole
localeCollate: 'en_US.utf8'
localeCType: 'en_US.utf8'
# secret:
# name: prole-db-user
postInitTemplateSQL:
- CREATE EXTENSION postgis;
- CREATE EXTENSION postgis_topology;
- CREATE EXTENSION fuzzystrmatch;
- CREATE EXTENSION postgis_tiger_geocoder;
- CREATE EXTENSION vector;
- CREATE EXTENSION tds_fdw;
# pg_tde requires the extension to be present in the image. Ensure prole-db image contains pg_tde before enabling.
- CREATE EXTENSION IF NOT EXISTS pg_tde;
enableSuperuserAccess: true
storage:
size: 1Gi
# pvcTemplate:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 1Gi
# storageClassName: synology-nfs-storage
# volumeMode: Filesystem
walStorage:
size: 1Gi
monitoring:
enablePodMonitor: true
# managed rw service
managed:
services:
additional:
- selectorType: rw
serviceTemplate:
metadata:
name: "prole-db-001"
labels:
test-label: "true"
annotations:
test-annotation: "true"
prometheus.io/scrape: "true"
prometheus.io/port: "9187"
prometheus.io/path: "/metrics"
spec:
type: LoadBalancer