Spring Cloud 配置服务器中是否可以有多个 GIt 主机?



随着最近Microsoft的Azure服务中断,我们的团队正在集思广益,为我们的应用添加冗余和容错。

在关于 Spring.IO 的文档中,有多种方法可以同时使用 Git、SVN 或 vault,但我对使用 Two Git 主机感兴趣。

设置复合配置文件可能是我想要的,但这听起来像是如果我尝试覆盖列出的所有存储库中的值并且我正在寻找完整的故障转移选项。

我的用例是如何配置配置服务器,以便在主机出现故障并且我们无法检索配置文件以故障转移到第二个 GIT 主机时。

这可能吗,配置会是什么样子?

我的猜测是这样的排序。

spring:
profiles:
cloud:
config:
server:
git:
uri: bitbucket.com
order: 1
git:
uri: github.com
order: 1

答案是使用复合特征:

spring:
profiles:
active: composite
cloud:
config:
server:
composite:
-
type: git
uri: file:///path/to/rex/git/repo
-
type: git
uri: file:///path/to/walter/git/repo

最新更新