mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Tags are labels assigned to individual members in order to alter its default behavior, i.e. exclude from the leader election or indicate a possibility to create base backups from the member. This commit only adds support for setting tags in the configuration file, exposes the tags to DCS /member subkey and returns the tags in a response of the API request. At the moment the tag names are not validated, nor they are interpreted in any way. Support for setting tags via the API is also in the scope of further work.
75 lines
1.7 KiB
YAML
75 lines
1.7 KiB
YAML
ttl: &ttl 30
|
|
loop_wait: &loop_wait 10
|
|
scope: &scope batman
|
|
restapi:
|
|
listen: 127.0.0.1:8008
|
|
connect_address: 127.0.0.1:8008
|
|
auth: 'username:password'
|
|
# certfile: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
|
# keyfile: /etc/ssl/private/ssl-cert-snakeoil.key
|
|
etcd:
|
|
scope: *scope
|
|
ttl: *ttl
|
|
host: 127.0.0.1:4001
|
|
#discovery_srv: my-etcd.domain
|
|
#zookeeper:
|
|
# scope: *scope
|
|
# session_timeout: *ttl
|
|
# reconnect_timeout: *loop_wait
|
|
# hosts:
|
|
# - 127.0.0.1:2181
|
|
# - 127.0.0.2:2181
|
|
# exhibitor:
|
|
# poll_interval: 300
|
|
# port: 8181
|
|
# hosts:
|
|
# - host1
|
|
# - host2
|
|
# - host3
|
|
postgresql:
|
|
name: postgresql0
|
|
scope: *scope
|
|
listen: 127.0.0.1:5432
|
|
connect_address: 127.0.0.1:5432
|
|
data_dir: data/postgresql0
|
|
maximum_lag_on_failover: 1048576 # 1 megabyte in bytes
|
|
use_slots: True
|
|
pg_rewind:
|
|
username: postgres
|
|
password: zalando
|
|
pg_hba:
|
|
- host all all 0.0.0.0/0 md5
|
|
- hostssl all all 0.0.0.0/0 md5
|
|
replication:
|
|
username: replicator
|
|
password: rep-pass
|
|
network: 127.0.0.1/32
|
|
superuser:
|
|
username: postgres
|
|
password: zalando
|
|
admin:
|
|
username: admin
|
|
password: admin
|
|
wal_e:
|
|
env_dir: /home/postgres/etc/wal-e.d/env
|
|
threshold_megabytes: 10240
|
|
threshold_backup_size_percentage: 30
|
|
restore: patroni/scripts/restore.py
|
|
#recovery_conf:
|
|
#restore_command: cp ../wal_archive/%f %p
|
|
parameters:
|
|
archive_mode: "on"
|
|
wal_level: hot_standby
|
|
archive_command: mkdir -p ../wal_archive && cp %p ../wal_archive/%f
|
|
max_wal_senders: 5
|
|
wal_keep_segments: 8
|
|
archive_timeout: 1800s
|
|
max_replication_slots: 5
|
|
hot_standby: "on"
|
|
wal_log_hints: "on"
|
|
tags:
|
|
nofailover: False
|
|
noloadbalance: False
|
|
clonefrom: False
|
|
replicatefrom: 127.0.0.1
|