etcd

ETCD configuration source

Configuration

## Configuration center related
asjard:
  config:
    ## etcd configuration center settings
    etcd:
      ## Configuration center name
      ## Configuration dependent on asjard.stores.etcd.clients.{client}
      # client: default
      ## Delimiter
      ## Delimiter between multiple keys in etcd
      # delimiter: "/"

Configuration priority

Priority increases from top to bottom. Use Englishasjard.config.etcd.delimiteras separator, do not end withasjard.config.etcd.delimiterending

  • /{app}/configs/: Project-level global configuration

  • /{app}/configs/{env}/: Environment-level global configuration

  • /{app}/configs/service/{group}/: Service-related configuration

  • /{app}/configs/service/{group}/{region}/: Service region-related configuration

  • /{app}/configs/service/{group}/{region}/{az}/: Service region and availability zone configuration

  • /{app}/configs/service/{service}/: Service-related configuration

  • /{app}/configs/service/{service}/{region}/: Service region-related configuration

  • /{app}/configs/service/{service}/{region}/{az}/: Service region and availability zone configuration

  • /{app}/configs/{env}/service/{group}/: Service-related configuration

  • /{app}/configs/{env}/service/{group}/{region}/: Service region-related configuration

  • /{app}/configs/{env}/service/{group}/{region}/{az}/: Service region and availability zone configuration

  • /{app}/configs/{env}/service/{service}/: Service-related configuration

  • /{app}/configs/{env}/service/{service}/{region}/: Service region-related configuration

  • /{app}/configs/{env}/service/{service}/{region}/{az}/: Service region and availability zone configuration

  • /{app}/configs/runtime/{instance.ID}/: Instance configuration

If files exist under the same prefix, then all configurations in the files have the priority of that prefix

It is recommended not to use key/value and files at the same time, because priorities under the same prefix are the same, causing divergence between startup-time configuration overrides and runtime configuration overrides

For example:

Use

to add configuration. File configurations can be viewedhere

Last updated