Open kamauz opened 2 months ago
If you don't want to use Consul to manage your config, you can disable the config provider via the environment variable
https://docs.edgexfoundry.org/3.1/microservices/configuration/CommonEnvironmentVariables/#edgex_config_provider
EDGEX_CONFIG_PROVIDER: "none"
Then, you can manage your CustomConfig in your file system.
However, the config should be read-only at runtime, and the credentials should not be passed from common config.
If you don't persist your credentials in the secret store, you can use SecretProvider() bootstrapInterfaces.SecretProvider
to retrieve the credentials from the insecure section.
https://github.com/edgexfoundry/app-functions-sdk-go/blob/d5728ffaae65ea0eca3f1f6683c2d3dae45a3477/pkg/interfaces/service.go#L149
Config example: https://github.com/edgexfoundry/app-service-configurable/blob/99abc15c93f70f8386f8be99e96e68a0293bb7bf/res/mqtt-export/configuration.yaml#L70 https://docs.edgexfoundry.org/3.1/design/adr/014-Secret-Provider-For-All/
Situation:
Goal:
Given the following snippet of code, I need to populate config.ServiceConfig.Database with service.config.Database , however service properties are not accessible
So I moved the focus on "LoadCustomConfig" function, but it would expect to read common configurations from a Consul. Otherwise the private configuration is loaded as-is from the default path (res/configuration.yaml) here's the code I'm referring to:
bootstrap/config/config.go