v.21.9Improvement

Support for Multiple Includes in Configuration

Support for multiple includes in configuration. It is possible to include users configuration, remote servers configuration from multiple sources. Simply place <include /> element with from_zk, from_env or incl attribute and it will be replaced with the substitution. #24404 (nvartolomei).
Added support for multiple include sources in ClickHouse configuration files, allowing users to include configurations such as users and remote servers from different locations like ZooKeeper, environment variables, or local files.

Why it matters

This feature improves flexibility and modularity in configuration management by enabling administrators to compose configuration files from multiple sources. It simplifies configuration updates and management in complex deployments by allowing inclusion from ZooKeeper, environment variables, or local file paths.

How to use it

Use the <include /> element in your configuration files with one of the following attributes: from_zk to include configuration from ZooKeeper, from_env to include from an environment variable, or incl to include from a local file. For example:

&lt;include from_zk="/path/in/zookeeper" /&gt;
&lt;include from_env="CONFIG_PATH" /&gt;
&lt;include incl="/etc/clickhouse/config.d/extra.xml" /&gt;