From b1ba999f50ed5e9db9e53e3a8f8ab6c2db7c8cc2 Mon Sep 17 00:00:00 2001 From: Sedky Date: Thu, 21 Nov 2024 09:44:48 -0600 Subject: [PATCH] Use keyfile and CAPath in Consul settings --- storage/kv/consul.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/storage/kv/consul.go b/storage/kv/consul.go index 0704177878b..b16a9515696 100644 --- a/storage/kv/consul.go +++ b/storage/kv/consul.go @@ -72,6 +72,14 @@ func newConsul(conf config.ConsulConfig) (Store, error) { defaultCfg.TLSConfig.CertFile = conf.TLSConfig.CertFile } + if conf.TLSConfig.KeyFile != "" { + defaultCfg.TLSConfig.KeyFile = conf.TLSConfig.KeyFile + } + + if conf.TLSConfig.CAPath != "" { + defaultCfg.TLSConfig.CAPath = conf.TLSConfig.CAPath + } + if conf.TLSConfig.CAFile != "" { defaultCfg.TLSConfig.CAFile = conf.TLSConfig.CAFile }