The Fabric Smart Client is a new Fabric Client that lets you focus on the business processes and simplifies the development of Fabric-based distributed application.
Apache License 2.0
52
stars
52
forks
source link
override configuration keys with environment variables #663
This PR enables the user to override any configuration key with an environment variable. Technically we were supposed to already have this feature (via viper's AutomaticEnv), but it was flaky and unpredictable:
Didn't work structs that we got via UnmarshalKey
Removed higher level sibling keys when you overrode a low level value!
With this change you can for instance share a 'default' core.yaml, but override node specific data like the database connectionString or the node id. To prevent confusion the environment variables for logging and the vault config have been removed so that they can only be accessed via the same path as other configurations.
The commit also upgrades viper to the latest stable version. That means that if we merge this and upgrade Token SDK, we have to make sure it deals with lowercase map keys properly (like we already do with for instance the P2P field in FSC).
This PR enables the user to override any configuration key with an environment variable. Technically we were supposed to already have this feature (via viper's AutomaticEnv), but it was flaky and unpredictable:
With this change you can for instance share a 'default' core.yaml, but override node specific data like the database connectionString or the node id. To prevent confusion the environment variables for logging and the vault config have been removed so that they can only be accessed via the same path as other configurations.
The commit also upgrades viper to the latest stable version. That means that if we merge this and upgrade Token SDK, we have to make sure it deals with lowercase map keys properly (like we already do with for instance the P2P field in FSC).