diff --git a/conf/config.json b/conf/config.json index e594d649e..f1a6a0a16 100644 --- a/conf/config.json +++ b/conf/config.json @@ -332,6 +332,10 @@ "host": "127.0.0.1", "port": 6379 }, + "redis": { + "host": "localhost", + "port": 6379 + }, "certFilePaths": { "key": "", "cert": "", diff --git a/lib/config.joi.js b/lib/config.joi.js index 0d7595964..c33b6a687 100644 --- a/lib/config.joi.js +++ b/lib/config.joi.js @@ -67,8 +67,16 @@ const joiSchema = joi.object({ port: joi.number().default(8900), }, redis: { - host: joi.string().default('localhost'), - port: joi.number().default(6379), + host: joi.string().when('sentinels', { + is: joi.exist(), + then: joi.forbidden(), + otherwise: joi.required(), + }), + port: joi.number().when('sentinels', { + is: joi.exist(), + then: joi.forbidden(), + otherwise: joi.required(), + }), name: joi.string().default('backbeat'), password: joi.string().default('').allow(''), sentinels: joi.alternatives([joi.string(), joi.array().items(