moleculer icon indicating copy to clipboard operation
moleculer copied to clipboard

Configuration registry

Open intech opened this issue 5 years ago • 1 comments

Now brokers configuration should be specified in moleculer.config.js or env. How do you look at integration with vault, etcd and other centralized configuration and secret key management systems? Can we implement a registry with providers support as it is implemented with logger, tracing, metrics? Thus, in env, you will need to specify only the connection to this configuration registry by a unique token (which for example will consist of namespace nodeId) and obtain individual settings.

intech avatar Feb 07 '20 18:02 intech

Yes, it can be a new feature in the future. By the way, since #611 the moleculer.config.js export can be an async Function. So you can make any connection to a remote registry, get the config and return it.

Pseudo example:

// moleculer.config.js

module.exports = async function() {
    return await etcdClient.get('moleculer-config').json();
}

icebob avatar Feb 07 '20 18:02 icebob