IHostApplicationBuilder.AddConfigServer should have an overload that takes a ConfigServerClientOptions instance.
Furthermore, the following code in Steeltoe:
if (!string.IsNullOrEmpty(hostEnvironment.EnvironmentName) &&
hostEnvironment.EnvironmentName != "Production")
{
// Only take IHostEnvironment.EnvironmentName when it was explicitly set (it defaults to "Production").
// In the default case, we want the various other ways of setting the environment name to kick in.
options.Environment = hostEnvironment.EnvironmentName;
}
is problematic. ConfigServerClientOptions.EnvironmentName should default to an empty string, and then ConfigServerConfigurationProvider should assume Production if still empty.
IHostApplicationBuilder.AddConfigServershould have an overload that takes aConfigServerClientOptionsinstance.Furthermore, the following code in Steeltoe:
is problematic.
ConfigServerClientOptions.EnvironmentNameshould default to an empty string, and thenConfigServerConfigurationProvidershould assumeProductionif still empty.