diff --git a/docs/ENVIRONMENT.rst b/docs/ENVIRONMENT.rst index 2af58004..50a73fa9 100644 --- a/docs/ENVIRONMENT.rst +++ b/docs/ENVIRONMENT.rst @@ -33,6 +33,7 @@ Consul - **PATRONI\_CONSUL\_CACERT**: (optional) The ca certificate. If pressent it will enable validation. - **PATRONI\_CONSUL\_CERT**: (optional) File with the client certificate - **PATRONI\_CONSUL\_KEY**: (optional) File with the client key. Can be empty if the key is part of certificate. +- **PATRONI\_CONSUL\_DC**: (optional) Datacenter to communicate with. By default the datacenter of the host is used. - **PATRONI\_CONSUL\_CHECKS**: (optional) list of Consul health checks used for the session. If not specified Consul will use "serfHealth" in additional to the TTL based check created by Patroni. Additional checks, in particular the "serfHealth", may cause the leader lock to expire faster than in `ttl` seconds when the leader instance becomes unavailable. Etcd diff --git a/docs/SETTINGS.rst b/docs/SETTINGS.rst index 24adc1b7..35d4a941 100644 --- a/docs/SETTINGS.rst +++ b/docs/SETTINGS.rst @@ -58,6 +58,7 @@ Most of the parameters are optional, but you have to specify one of the **host** - **cacert**: (optional) The ca certificate. If pressent it will enable validation. - **cert**: (optional) file with the client certificate - **key**: (optional) file with the client key. Can be empty if the key is part of **cert**. +- **dc**: (optional) Datacenter to communicate with. By default the datacenter of the host is used. - **checks**: (optional) list of Consul health checks used for the session. If not specified Consul will use "serfHealth" in additional to the TTL based check created by Patroni. Additional checks, in particular the "serfHealth", may cause the leader lock to expire faster than in `ttl` seconds when the leader instance becomes unavailable Etcd diff --git a/patroni/config.py b/patroni/config.py index 7d8b908d..8a8ef3cc 100644 --- a/patroni/config.py +++ b/patroni/config.py @@ -243,7 +243,7 @@ class Config(object): if name and suffix: # PATRONI_(ETCD|CONSUL|ZOOKEEPER|EXHIBITOR|...)_(HOSTS?|PORT|..) if suffix in ('HOST', 'HOSTS', 'PORT', 'SRV', 'URL', 'PROXY', 'CACERT', 'CERT', 'KEY', - 'VERIFY', 'TOKEN', 'CHECKS') and '_' not in name: + 'VERIFY', 'TOKEN', 'CHECKS', 'DC') and '_' not in name: value = os.environ.pop(param) if suffix == 'PORT': value = value and parse_int(value)