avoid yaml confusion in postgres manifests

This commit is contained in:
Felix Kunde 2019-06-27 18:44:45 +02:00
parent 01258740c2
commit 670e001eeb
3 changed files with 43 additions and 47 deletions

View File

@ -1,6 +1,5 @@
apiVersion: "acid.zalan.do/v1" apiVersion: "acid.zalan.do/v1"
kind: postgresql kind: postgresql
metadata: metadata:
name: acid-test-cluster name: acid-test-cluster
spec: spec:
@ -12,9 +11,9 @@ spec:
teamId: "ACID" teamId: "ACID"
volume: volume:
size: 1Gi size: 1Gi
#storageClass: my-sc # storageClass: my-sc
numberOfInstances: 2 numberOfInstances: 2
users: #Application/Robot users users: # Application/Robot users
zalando: zalando:
- superuser - superuser
- createdb - createdb
@ -24,8 +23,11 @@ spec:
- 127.0.0.1/32 - 127.0.0.1/32
databases: databases:
foo: zalando foo: zalando
#Expert section
# Expert section
enableShmVolume: true enableShmVolume: true
# spiloFSGroup: 103
postgresql: postgresql:
version: "10" version: "10"
parameters: parameters:
@ -39,7 +41,6 @@ spec:
limits: limits:
cpu: 300m cpu: 300m
memory: 300Mi memory: 300Mi
# spiloFSGroup: 103
patroni: patroni:
initdb: initdb:
encoding: "UTF8" encoding: "UTF8"
@ -48,42 +49,42 @@ spec:
pg_hba: pg_hba:
- hostssl all all 0.0.0.0/0 md5 - hostssl all all 0.0.0.0/0 md5
- host all all 0.0.0.0/0 md5 - host all all 0.0.0.0/0 md5
#slots: # slots:
# permanent_physical_1: # permanent_physical_1:
# type: physical # type: physical
# permanent_logical_1: # permanent_logical_1:
# type: logical # type: logical
# database: foo # database: foo
# plugin: pgoutput # plugin: pgoutput
ttl: 30 ttl: 30
loop_wait: &loop_wait 10 loop_wait: &loop_wait 10
retry_timeout: 10 retry_timeout: 10
maximum_lag_on_failover: 33554432 maximum_lag_on_failover: 33554432
# restore a Postgres DB with point-in-time-recovery # restore a Postgres DB with point-in-time-recovery
# with a non-empty timestamp, clone from an S3 bucket using the latest backup before the timestamp # with a non-empty timestamp, clone from an S3 bucket using the latest backup before the timestamp
# with an empty/absent timestamp, clone from an existing alive cluster using pg_basebackup # with an empty/absent timestamp, clone from an existing alive cluster using pg_basebackup
# clone: # clone:
# uid: "efd12e58-5786-11e8-b5a7-06148230260c" # uid: "efd12e58-5786-11e8-b5a7-06148230260c"
# cluster: "acid-batman" # cluster: "acid-batman"
# timestamp: "2017-12-19T12:40:33+01:00" # timezone required (offset relative to UTC, see RFC 3339 section 5.6) # timestamp: "2017-12-19T12:40:33+01:00" # timezone required (offset relative to UTC, see RFC 3339 section 5.6)
# s3_wal_path: "s3://custom/path/to/bucket" # s3_wal_path: "s3://custom/path/to/bucket"
# run periodic backups with k8s cron jobs # run periodic backups with k8s cron jobs
# enableLogicalBackup: true # enableLogicalBackup: true
# logicalBackupSchedule: "30 00 * * *" # logicalBackupSchedule: "30 00 * * *"
maintenanceWindows: maintenanceWindows:
- 01:00-06:00 #UTC - 01:00-06:00 #UTC
- Sat:00:00-04:00 - Sat:00:00-04:00
#sidecars: # sidecars:
# - name: "telegraf-sidecar" # - name: "telegraf-sidecar"
# image: "telegraf:latest" # image: "telegraf:latest"
# resources: # resources:
# limits: # limits:
# cpu: 500m # cpu: 500m
# memory: 500Mi # memory: 500Mi
# requests: # requests:
# cpu: 100m # cpu: 100m
# memory: 100Mi # memory: 100Mi
# env: # env:
# - name: "USEFUL_VAR" # - name: "USEFUL_VAR"
# value: "perhaps-true" # value: "perhaps-true"

View File

@ -9,16 +9,11 @@ spec:
size: 1Gi size: 1Gi
numberOfInstances: 2 numberOfInstances: 2
users: users:
# database owner zalando: # database owner
zalando:
- superuser - superuser
- createdb - createdb
foo_user: [] # role for application foo
# role for application foo
foo_user: []
#databases: name->owner
databases: databases:
foo: zalando foo: zalando # dbname: owner
postgresql: postgresql:
version: "10" version: "10"

View File

@ -3,7 +3,7 @@ apiVersion: "acid.zalan.do/v1"
kind: postgresql kind: postgresql
metadata: metadata:
name: acid-standby-cluster name: acid-standby-cluster
namespace: default namespace: default
spec: spec:
teamId: "ACID" teamId: "ACID"
volume: volume:
@ -11,10 +11,10 @@ spec:
numberOfInstances: 1 numberOfInstances: 1
postgresql: postgresql:
version: "10" version: "10"
# Make this a standby cluster and provide the s3 bucket path of source cluster for continuous streaming. # Make this a standby cluster and provide the s3 bucket path of source cluster for continuous streaming.
standby: standby:
s3_wal_path: "s3://path/to/bucket/containing/wal/of/source/cluster/" s3_wal_path: "s3://path/to/bucket/containing/wal/of/source/cluster/"
maintenanceWindows: maintenanceWindows:
- 01:00-06:00 #UTC - 01:00-06:00 #UTC
- Sat:00:00-04:00 - Sat:00:00-04:00