Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about config #376

Open
go-slark opened this issue Apr 7, 2024 · 4 comments
Open

about config #376

go-slark opened this issue Apr 7, 2024 · 4 comments

Comments

@go-slark
Copy link

go-slark commented Apr 7, 2024

  1. Why not use viper lib to load config data source? Viper support load config from file / env /config center, watch change too
  2. Support multi data source?
  3. Support load config center data to update local config file when config center is formal, to prevent config center crash
@askuy
Copy link
Contributor

askuy commented Apr 15, 2024

1 因为viper有些接口没暴露,比如想输出格式化配置,还有他设置一些远程配置,需要加载etcd依赖,并且config协议不能统一。
希望的是--config=config.toml, --config=etcd:///xxx.com/, --confg=k8s:///xxx.com/ddd这样统一配置
2 这个比较复杂,而且特别小众场景
3 k8s config map就可以了。

@go-slark
Copy link
Author

  1. 多配置源的场景还是有的,如从环境变量和配置文件读取,一些通过配置文件,一些依赖环境变量,
  2. 意思是从配置文件读取配置后覆盖写configmap吗?
  3. 多配置源还需考虑配置加载顺序

@askuy
Copy link
Contributor

askuy commented May 3, 2024

  1. 多配置源的场景还是有的,如从环境变量和配置文件读取,一些通过配置文件,一些依赖环境变量,
  2. 意思是从配置文件读取配置后覆盖写configmap吗?
  3. 多配置源还需考虑配置加载顺序

明白你的意思了。这个跟viper一样吧。

@askuy
Copy link
Contributor

askuy commented May 3, 2024

  1. 多配置源的场景还是有的,如从环境变量和配置文件读取,一些通过配置文件,一些依赖环境变量,
  2. 意思是从配置文件读取配置后覆盖写configmap吗?
  3. 多配置源还需考虑配置加载顺序

之前考虑过这个场景,但是后续并没有继续这么做,你要不要来改造试试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants