edgexfoundry / go-mod-bootstrap

go-mod-bootstrap
Apache License 2.0
15 stars 55 forks source link

Add an option to make the environment variable config override take priority #747

Closed cloudxxx8 closed 3 weeks ago

cloudxxx8 commented 1 month ago

πŸš€ Feature Request

Relevant Package [REQUIRED]

This feature request is for all ### Description [**REQUIRED**] In EdgeX v3, if the config provider is enabled, environment variable override only takes effect and push to the config provider in the first start up. However, some users still use to set the environment variable override and use them to control the system. ### Describe the solution you'd like Create a new EDGEX_OVERWRITE_CONFIG environment variable, like others in https://docs.edgexfoundry.org/3.1/microservices/configuration/CommonEnvironmentVariables/ The effect will be the same as -o/--overwrite flag https://docs.edgexfoundry.org/3.1/microservices/configuration/CommonCommandLineOptions/#overwrite If it is set to "true",overwrite configuration in provider with local configuration and environment variables. The default value is "false", and the empty string and all other values treat as "false"
cloudxxx8 commented 3 weeks ago

the environment variable should overide the flag, so there should be no default value.