Add support for configuration directories (#1669) (#1671)

It is now also possible to point the configuration path to a directory instead of a file.
Patroni will find all yml files in the directory and apply them in sorted order

Close https://github.com/zalando/patroni/issues/1669
This commit is contained in:
Floris van Nee
2020-09-02 13:57:22 +02:00
committed by GitHub
parent 13e24d832d
commit 98f50423ca
3 changed files with 72 additions and 6 deletions
+2
View File
@@ -20,6 +20,8 @@ Patroni configuration is stored in the DCS (Distributed Configuration Store). Th
It is possible to set/override some of the "Local" configuration parameters with environment variables.
Environment configuration is very useful when you are running in a dynamic environment and you don't know some of the parameters in advance (for example it's not possible to know your external IP address when you are running inside ``docker``).
The local configuration can be either a single YAML file or a directory. When it is a directory, all YAML files in that directory are loaded one by one in sorted order. In case a key is defined in multiple files, the occurrence in the last file takes precedence.
Some of the PostgreSQL parameters must hold the same values on the master and the replicas. For those, values set either in the local patroni configuration files or via the environment variables take no effect. To alter or set their values one must change the shared configuration in the DCS. Below is the actual list of such parameters together with the default values:
- max_connections: 100