From 670e001eeb2d23d0649a33bce48b06359a478360 Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Thu, 27 Jun 2019 18:44:45 +0200 Subject: [PATCH] avoid yaml confusion in postgres manifests --- manifests/complete-postgres-manifest.yaml | 73 ++++++++++++----------- manifests/minimal-postgres-manifest.yaml | 11 +--- manifests/standby-manifest.yaml | 6 +- 3 files changed, 43 insertions(+), 47 deletions(-) diff --git a/manifests/complete-postgres-manifest.yaml b/manifests/complete-postgres-manifest.yaml index b0f585c38..38f582281 100644 --- a/manifests/complete-postgres-manifest.yaml +++ b/manifests/complete-postgres-manifest.yaml @@ -1,6 +1,5 @@ apiVersion: "acid.zalan.do/v1" kind: postgresql - metadata: name: acid-test-cluster spec: @@ -12,9 +11,9 @@ spec: teamId: "ACID" volume: size: 1Gi - #storageClass: my-sc +# storageClass: my-sc numberOfInstances: 2 - users: #Application/Robot users + users: # Application/Robot users zalando: - superuser - createdb @@ -24,8 +23,11 @@ spec: - 127.0.0.1/32 databases: foo: zalando -#Expert section + +# Expert section + enableShmVolume: true +# spiloFSGroup: 103 postgresql: version: "10" parameters: @@ -39,7 +41,6 @@ spec: limits: cpu: 300m memory: 300Mi - # spiloFSGroup: 103 patroni: initdb: encoding: "UTF8" @@ -48,42 +49,42 @@ spec: pg_hba: - hostssl all all 0.0.0.0/0 md5 - host all all 0.0.0.0/0 md5 - #slots: - # permanent_physical_1: - # type: physical - # permanent_logical_1: - # type: logical - # database: foo - # plugin: pgoutput +# slots: +# permanent_physical_1: +# type: physical +# permanent_logical_1: +# type: logical +# database: foo +# plugin: pgoutput ttl: 30 loop_wait: &loop_wait 10 retry_timeout: 10 maximum_lag_on_failover: 33554432 - # 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 an empty/absent timestamp, clone from an existing alive cluster using pg_basebackup - # clone: - # uid: "efd12e58-5786-11e8-b5a7-06148230260c" - # cluster: "acid-batman" - # 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" +# 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 an empty/absent timestamp, clone from an existing alive cluster using pg_basebackup +# clone: +# uid: "efd12e58-5786-11e8-b5a7-06148230260c" +# cluster: "acid-batman" +# 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" - # run periodic backups with k8s cron jobs - # enableLogicalBackup: true - # logicalBackupSchedule: "30 00 * * *" +# run periodic backups with k8s cron jobs +# enableLogicalBackup: true +# logicalBackupSchedule: "30 00 * * *" maintenanceWindows: - 01:00-06:00 #UTC - Sat:00:00-04:00 - #sidecars: - # - name: "telegraf-sidecar" - # image: "telegraf:latest" - # resources: - # limits: - # cpu: 500m - # memory: 500Mi - # requests: - # cpu: 100m - # memory: 100Mi - # env: - # - name: "USEFUL_VAR" - # value: "perhaps-true" +# sidecars: +# - name: "telegraf-sidecar" +# image: "telegraf:latest" +# resources: +# limits: +# cpu: 500m +# memory: 500Mi +# requests: +# cpu: 100m +# memory: 100Mi +# env: +# - name: "USEFUL_VAR" +# value: "perhaps-true" diff --git a/manifests/minimal-postgres-manifest.yaml b/manifests/minimal-postgres-manifest.yaml index eea717474..de90926dd 100644 --- a/manifests/minimal-postgres-manifest.yaml +++ b/manifests/minimal-postgres-manifest.yaml @@ -9,16 +9,11 @@ spec: size: 1Gi numberOfInstances: 2 users: - # database owner - zalando: + zalando: # database owner - superuser - createdb - - # role for application foo - foo_user: [] - - #databases: name->owner + foo_user: [] # role for application foo databases: - foo: zalando + foo: zalando # dbname: owner postgresql: version: "10" diff --git a/manifests/standby-manifest.yaml b/manifests/standby-manifest.yaml index a92045dba..c5b999a62 100644 --- a/manifests/standby-manifest.yaml +++ b/manifests/standby-manifest.yaml @@ -3,7 +3,7 @@ apiVersion: "acid.zalan.do/v1" kind: postgresql metadata: name: acid-standby-cluster - namespace: default + namespace: default spec: teamId: "ACID" volume: @@ -11,10 +11,10 @@ spec: numberOfInstances: 1 postgresql: 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: s3_wal_path: "s3://path/to/bucket/containing/wal/of/source/cluster/" maintenanceWindows: - 01:00-06:00 #UTC - - Sat:00:00-04:00 \ No newline at end of file + - Sat:00:00-04:00